im::floo::floolib::BMXRosterService
Friend Service
Public Classes
Name | |
---|---|
class | Application Friend invitation |
Public Functions
Name | |
---|---|
synchronized void | delete() |
[BMXErrorCode] | get(ListOfLongLong list, boolean forceRefresh) Get friend list, force pull from server-side if forceRefresh == true |
[BMXErrorCode] | fetchRosterById(long rosterId, boolean forceRefresh, BMXRosterItem item) Search for users |
[BMXErrorCode] | search(long rosterId, boolean forceRefresh, BMXRosterItem item) Search for users |
[BMXErrorCode] | fetchRosterByName(String name, boolean forceRefresh, BMXRosterItem item) Search for users |
[BMXErrorCode] | search(String name, boolean forceRefresh, BMXRosterItem item) Search for users |
[BMXErrorCode] | fetchRostersByIdList(ListOfLongLong rosterIdList, BMXRosterItemList list, boolean forceRefresh) Batch search for users |
[BMXErrorCode] | search(ListOfLongLong rosterIdList, BMXRosterItemList list, boolean forceRefresh) Batch search for users |
[BMXErrorCode] | setItemLocalExtension(BMXRosterItem item, String extension) Update friend's local extension information |
[BMXErrorCode] | setItemExtension(BMXRosterItem item, String extension) Update friend server extension information |
[BMXErrorCode] | setItemAlias(BMXRosterItem item, String alias) Update friend's alias |
[BMXErrorCode] | setItemMuteNotification(BMXRosterItem item, boolean status) Set whether to reject user message |
[BMXErrorCode] | getApplicationList(ApplicationPage result, String cursor, int pageSize) Get list of adding friend requests |
[BMXErrorCode] | apply(long rosterId, String message, String authAnswer) |
[BMXErrorCode] | apply(long rosterId, String message) Request to add friend |
[BMXErrorCode] | remove(long rosterId) Delete friend |
[BMXErrorCode] | accept(long rosterId) Accept adding friend request |
[BMXErrorCode] | decline(long rosterId, String reason) Reject adding friend request |
[BMXErrorCode] | block(long rosterId) Add to blacklist |
[BMXErrorCode] | unblock(long rosterId) Remove from blacklist |
[BMXErrorCode] | getBlockList(ListOfLongLong list, boolean forceRefresh) Get blacklist, force pull from server-side if forceRefresh == true |
[BMXErrorCode] | downloadAvatar(BMXRosterItem item, boolean thumbnail, FileProgressListener listener) Download avatar |
void | addRosterListener(BMXRosterServiceListener listener) Add friend change listener |
void | removeRosterListener(BMXRosterServiceListener listener) Remove friend change 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
)
Get friend list, force pull from server-side if forceRefresh == true
Parameters:
- list List of friend ids, pass in an empty list function and fetch the returned friend id list here
- 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
Return: [BMXErrorCode]
Example:
function fetchRosterById
inline BMXErrorCode fetchRosterById(
long rosterId,
boolean forceRefresh,
BMXRosterItem item
)
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.
- item User information returned by query, passed in a pointing-to-empty shared_ptr objective function and assigned automatically after executed.
Return: [BMXErrorCode]
Example:
function search
inline BMXErrorCode search(
long rosterId,
boolean forceRefresh,
BMXRosterItem item
)
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.
- item User information returned by query, passed in a pointing-to-empty shared_ptr objective function and assigned automatically after executed.
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
)
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.
- item User information returned by query, passed in a pointing-to-empty shared_ptr objective function and assigned automatically after executed.
Return: [BMXErrorCode]
Example:
function search
inline BMXErrorCode search(
String name,
boolean forceRefresh,
BMXRosterItem item
)
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.
- item User information returned by query, passed in a pointing-to-empty shared_ptr objective function and assigned automatically after executed.
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
)
Batch search for users
Parameters:
- rosterIdList List of user ids to search
- list Returned friend information list, pass in an empty list function and fetch the returned result here
- forceRefresh Whether to force fetch from server, true to force fetch from server
Return: [BMXErrorCode]
Example:
function search
inline BMXErrorCode search(
ListOfLongLong rosterIdList,
BMXRosterItemList list,
boolean forceRefresh
)
Batch search for users
Parameters:
- rosterIdList List of user ids to search
- list Returned friend information list, pass in an empty list function and fetch the returned result here
- forceRefresh Whether to force fetch from server, true to force fetch from server
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
)
Update friend's local extension information
Parameters:
- item User information
- extension Local extension information
Return: [BMXErrorCode]
Example:
function setItemExtension
inline BMXErrorCode setItemExtension(
BMXRosterItem item,
String extension
)
Update friend server extension information
Parameters:
- item User information
- extension Server extension information
Return: [BMXErrorCode]
Example:
function setItemAlias
inline BMXErrorCode setItemAlias(
BMXRosterItem item,
String alias
)
Update friend's alias
Parameters:
- item User information
- alias Friend alias
Return: [BMXErrorCode]
Example:
function setItemMuteNotification
inline BMXErrorCode setItemMuteNotification(
BMXRosterItem item,
boolean status
)
Set whether to reject user message
Parameters:
- item User information
- status Whether to reject user message, true to reject, false to accept
Return: [BMXErrorCode]
Example:
function getApplicationList
inline BMXErrorCode getApplicationList(
ApplicationPage result,
String cursor,
int pageSize
)
Get list of adding friend requests
Parameters:
- result Returned friend application list information, pass in a pointing-to-empty shared_ptr objective function which will be automatically assigned after executed.
- cursor Paged starting cursor, passed in as empty-valued first, followed by the cursor in the result returned by last operation
- pageSize Page size
Return: [BMXErrorCode]
Example:
function apply
inline BMXErrorCode apply(
long rosterId,
String message,
String authAnswer
)
Example:
function apply
inline BMXErrorCode apply(
long rosterId,
String message
)
Request to add friend
Parameters:
- rosterId User id requested to be added
- message Friend application information
Return: [BMXErrorCode]
Example:
function remove
inline BMXErrorCode remove(
long rosterId
)
Delete friend
Parameters:
- rosterId Delete friend id
Return: [BMXErrorCode]
Example:
function accept
inline BMXErrorCode accept(
long rosterId
)
Accept adding friend request
Parameters:
- rosterId User id to be added as a friend
Return: [BMXErrorCode]
Example:
function decline
inline BMXErrorCode decline(
long rosterId,
String reason
)
Reject adding friend request
Parameters:
- rosterId User id to be added as a friend
- reason Reason for rejection
Return: [BMXErrorCode]
Example:
function block
inline BMXErrorCode block(
long rosterId
)
Add to blacklist
Parameters:
- rosterId Blacklisted user id
Return: [BMXErrorCode]
Example:
function unblock
inline BMXErrorCode unblock(
long rosterId
)
Remove from blacklist
Parameters:
- rosterId Unblacklisted user id
Return: [BMXErrorCode]
Example:
function getBlockList
inline BMXErrorCode getBlockList(
ListOfLongLong list,
boolean forceRefresh
)
Get blacklist, force pull from server-side if forceRefresh == true
Parameters:
- list List of friend ids, pass in an empty list function and fetch the returned blacklist id list here.
- 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
Return: [BMXErrorCode]
Example:
function downloadAvatar
inline BMXErrorCode downloadAvatar(
BMXRosterItem item,
boolean thumbnail,
FileProgressListener listener
)
Download avatar
Parameters:
- item User information
- thumbnail Whether to download thumbnail, true for thumbnail, false for original
- listener Download callback function
Return: [BMXErrorCode]
Example:
function addRosterListener
inline void addRosterListener(
BMXRosterServiceListener listener
)
Add friend change listener
Parameters:
- listener Friend change listener
Example:
function removeRosterListener
inline void removeRosterListener(
BMXRosterServiceListener listener
)
Remove friend change listener
Parameters:
- listener Friend change 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