Inherits from | NSObject |
Conforms to | NSCoding NSCopying |
Declared in | QBChatRoom.h |
Overview
QBChatRoom structure. Represents chat room entity
Warning: Deprecated in QB iOS SDK 2.3: Use QBChatDialog instead
Tasks
-
name
Room name
property -
JID
Room JID
property -
isJoined
Is current user joined this room
property -
– initWithRoomName:
Init QBChatRoom instance with name If room name contains (“ ”) (space) character - it will be replaceed with “_” (underscore) character. If room name contains (“),(),(&),(‘),(/),(:),(<),(>),(@),((),()),(:),(;) characters - they will be removed. As user room nickname we will use user ID
-
– initWithRoomName:nickname:
Init QBChatRoom instance with name & user nickname If room name contains (“ ”) (space) character - it will be replaceed with “_” (underscore) character. If room name contains (“),(),(&),(‘),(/),(:),(<),(>),(@),((),()),(:),(;) characters - they will be removed.
-
– initWithRoomJID:
Init QBChatRoom instance with JID
-
– initWithRoomJID:nickname:
-
– sendMessage:
Send message to current room
-
– sendMessageWithoutJoin:
Send message to current room, without join it
-
– joinRoom
Join current room
-
– joinRoomWithHistoryAttribute:
Join current room
-
– leaveRoom
Leave current room
-
– requestOnlineUsers
Request room’s online users
Properties
JID 
@property (strong, nonatomic, readonly) NSString *JID
Discussion
Room JID
Declared In
QBChatRoom.h
Instance Methods
initWithRoomJID: 
- (id)initWithRoomJID:(NSString *)roomJID
Discussion
Init QBChatRoom instance with JID
Parameters
- roomJID
Room JID
Return Value
QBChatRoom instance
Declared In
QBChatRoom.h
initWithRoomJID:nickname: 
- (id)initWithRoomJID:(NSString *)roomJID nickname:(NSString *)nickname
Return Value
QBChatRoom instance
Declared In
QBChatRoom.h
initWithRoomName: 
- (id)initWithRoomName:(NSString *)roomName
Discussion
Init QBChatRoom instance with name If room name contains (“ ”) (space) character - it will be replaceed with “_” (underscore) character. If room name contains (“),(),(&),(‘),(/),(:),(<),(>),(@),((),()),(:),(;) characters - they will be removed. As user room nickname we will use user ID
Warning: Deprecated in QB iOS SDK 1.8.6: Use method with JID instead
Parameters
- roomName
Room name
Return Value
QBChatRoom instance
Declared In
QBChatRoom.h
initWithRoomName:nickname: 
- (id)initWithRoomName:(NSString *)roomName nickname:(NSString *)nickname
Discussion
Init QBChatRoom instance with name & user nickname If room name contains (“ ”) (space) character - it will be replaceed with “_” (underscore) character. If room name contains (“),(),(&),(‘),(/),(:),(<),(>),(@),((),()),(:),(;) characters - they will be removed.
Warning: Deprecated in QB iOS SDK 1.8.6: Use method with JID instead
Return Value
QBChatRoom instance
Declared In
QBChatRoom.h
joinRoomWithHistoryAttribute: 
- (void)joinRoomWithHistoryAttribute:(NSDictionary *)historyAttribute
Discussion
Join current room
Parameters
- historyAttribute
Attribite to manage the amount of discussion history provided on entering a room. More info here http://xmpp.org/extensions/xep-0045.html#enter-history
Declared In
QBChatRoom.h
requestOnlineUsers 
- (void)requestOnlineUsers
Discussion
Request room’s online users
Declared In
QBChatRoom.h