[TOC]
add_room_member(rid, uid, callback = None, timeout = 0)
- rid: (Required | int) room id
- uid: (Optional | int) user id
- callback: (Optional | a sub-class of BasicCallback ) used in async implementation
class BasicCallback(object):
def callback(self, error_code):
pass
- in async implementation, return None
- in sync implementation:
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success
delete_room_member(rid, uid, callback = None, timeout = 0)
- rid: (Required | int) room id
- uid: (Optional | int) user id
- callback: (Optional | a sub-class of BasicCallback ) used in async implementation
class BasicCallback(object):
def callback(self, error_code):
pass
- in async implementation, return None
- in sync implementation:
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success
set_room_info(rid, oinfo = None, pinfo = None, callback = None, timeout = 0)
- rid: (Required | int) room id
- oinfo: (Optional | str) public info
- pinfo: (Optional | str) private info
- callback: (Optional | a sub-class of BasicCallback ) used in async implementation
class BasicCallback(object):
def callback(self, error_code):
pass
- in async implementation, return None
- in sync implementation:
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success
get_room_info(rid, callback = None, timeout = 0)
- rid: (Required | int) room id
- callback: (Optional | a sub-class of GetRoomInfoCallback ) used in async implementation
class GetRoomInfoCallback(object):
def callback(self, oinfo, pinfo, error):
pass
- in async implementation, return None
- in sync implementation:
- oinfo: (int) public info
- pinfo: (int) private info
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success
add_room_ban(rid, uid, btime, callback = None, timeout = 0)
- rid: (Required | int) room id, if rid = None, is baned for all room
- uid: (Required | int) user id
- btime: (Optional | int) ban time in second
- callback: (Optional | a sub-class of BasicCallback ) used in async implementation
class BasicCallback(object):
def callback(self, error_code):
pass
- in async implementation, return None
- in sync implementation:
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success
remove_room_ban(rid, uid, callback = None, timeout = 0)
- rid: (Required | int) room id, if rid = None, is removed ban for all room
- uid: (Required | int) user id
- callback: (Optional | a sub-class of BasicCallback ) used in async implementation
class BasicCallback(object):
def callback(self, error_code):
pass
- in async implementation, return None
- in sync implementation:
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success
is_ban_of_room(rid, uid, callback = None, timeout = 0)
- rid: (Required | int) room id
- uid: (Required | int) user id
- callback: (Optional | a sub-class of IsBanOfRoomCallback ) used in async implementation
class IsBanOfRoomCallback(object):
def callback(self, ok, error_code):
pass
- in async implementation, return None
- in sync implementation:
- ok: (bool) is ban
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success
get_room_members(rid, callback = None, timeout = 0)
- rid: (Required | int) room id
- callback: (Optional | a sub-class of GetRoomMembersCallback ) used in async implementation
class GetRoomMembersCallback(object):
def callback(self, uids, error_code):
pass
- in async implementation, return None
- in sync implementation:
- uids: (list) member uids list
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success
get_room_count(rids, callback = None, timeout = 0)
- rids: (Required | [int]) room ids list
- callback: (Optional | a sub-class of GetRoomCountCallback ) used in async implementation
class GetRoomCountCallback(object):
def callback(self, count, error_code):
pass
- in async implementation, return None
- in sync implementation:
- count: (map<int, int>) rid => members count in room
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success