Conforms to NSObject
Declared in ChatDelegates.h

Overview

QBChatDelegate protocol definition This protocol defines methods signatures for callbacks. Implement this protocol in your class and add [QBChat instance].addDelegate to your implementation instance to receive callbacks from QBChat

Tasks

Instance Methods

chatContactListDidChange:

- (void)chatContactListDidChange:(QBContactList *)contactList
Discussion

Called in case of changing contact list

Declared In

ChatDelegates.h

chatDidAccidentallyDisconnect

- (void)chatDidAccidentallyDisconnect
Discussion

Fired when XMPP stream is accidentaly disconnected

Declared In

ChatDelegates.h

chatDidConnect

- (void)chatDidConnect
Discussion

Fired when XMPP stream established connection

Declared In

ChatDelegates.h

chatDidDeliverMessageWithID:

- (void)chatDidDeliverMessageWithID:(NSString *)messageID
Discussion

Called when you received a confirmation about message delivery

Parameters

messageID

ID of an original message

Declared In

ChatDelegates.h

chatDidFailWithError:

- (void)chatDidFailWithError:(NSInteger)code
Discussion

didFailWithError fired when connection error occurs

Warning: Deprecated in QB iOS SDK 2.3: Use chatDidFailWithStreamError: instead

Parameters

error

Error code from QBChatServiceError enum

Declared In

ChatDelegates.h

chatDidFailWithStreamError:

- (void)chatDidFailWithStreamError:(NSError *)error
Discussion

chatDidFailWithStreamError fired when connection error

Parameters

error

XMPPStream Error

Declared In

ChatDelegates.h

chatDidLogin

- (void)chatDidLogin
Discussion

didLogin fired by QBChat when connection to service established and login is successfull

Declared In

ChatDelegates.h

chatDidNotLogin

- (void)chatDidNotLogin
Discussion

didNotLogin fired when login process did not finished successfully

Warning: Deprecated in QB iOS SDK 2.3: Use chatDidNotLoginWithError: instead

Declared In

ChatDelegates.h

chatDidNotLoginWithError:

- (void)chatDidNotLoginWithError:(NSError *)error
Discussion

didNotLoginWithError fired when login process did not finished successfully

Parameters

error

Error

Declared In

ChatDelegates.h

chatDidNotReceivePrivacyListNamesDueToError:

- (void)chatDidNotReceivePrivacyListNamesDueToError:(id)error
Discussion

Called when you failed to receive privacy list names

Parameters

error

Error

Declared In

ChatDelegates.h

chatDidNotReceivePrivacyListWithName:error:

- (void)chatDidNotReceivePrivacyListWithName:(NSString *)name error:(id)error
Discussion

Called when you failed to receive a list of privacy items

Parameters

name

privacy list name

error

Error

Declared In

ChatDelegates.h

chatDidNotSendMessage:error:

- (void)chatDidNotSendMessage:(QBChatMessage *)message error:(NSError *)error
Discussion

didNotSendMessage fired when message cannot be send to user

Parameters

message

message passed to sendMessage method into QBChat

error

Error

Declared In

ChatDelegates.h

chatDidNotSendMessage:toRoomJid:error:

- (void)chatDidNotSendMessage:(QBChatMessage *)message toRoomJid:(NSString *)roomJid error:(NSError *)error
Discussion

didNotSendMessage fired when message cannot be send to the group chat

Parameters

message

message passed to sendMessage method into QBChat

roomJid

JID of the room

error

Error

Declared In

ChatDelegates.h

chatDidNotSetActivePrivacyListWithName:error:

- (void)chatDidNotSetActivePrivacyListWithName:(NSString *)name error:(id)error
Discussion

Called when you failed to create/edit an active privacy list

Parameters

name

privacy list name

error

Error

Declared In

ChatDelegates.h

chatDidNotSetDefaultPrivacyListWithName:error:

- (void)chatDidNotSetDefaultPrivacyListWithName:(NSString *)name error:(id)error
Discussion

Called when you failed to set a default privacy list

Parameters

name

privacy list name

error

Error

Declared In

ChatDelegates.h

chatDidNotSetPrivacyListWithName:error:

- (void)chatDidNotSetPrivacyListWithName:(NSString *)name error:(id)error
Discussion

Called when you failed to create/edit a privacy list

Parameters

name

privacy list name

error

Error

Declared In

ChatDelegates.h

chatDidReadMessageWithID:

- (void)chatDidReadMessageWithID:(NSString *)messageID
Discussion

Called when you received a confirmation about message read

Parameters

messageID

ID of an original message

Declared In

ChatDelegates.h

chatDidReceiveAcceptContactRequestFromUser:

- (void)chatDidReceiveAcceptContactRequestFromUser:(NSUInteger)userID
Discussion
  • Called when user has accepted your contact request +
  • @param userID User ID from which accepted your request +

Declared In

ChatDelegates.h

chatDidReceiveContactAddRequestFromUser:

- (void)chatDidReceiveContactAddRequestFromUser:(NSUInteger)userID
Discussion

Called in case receiving contact request

Parameters

userID

User ID from which received contact request

Declared In

ChatDelegates.h

chatDidReceiveContactItemActivity:isOnline:status:

- (void)chatDidReceiveContactItemActivity:(NSUInteger)userID isOnline:(BOOL)isOnline status:(NSString *)status
Discussion

Called in case changing contact’s online status

Parameters

userID

User which online status has changed

isOnline

New user status (online or offline)

status

Custom user status

Declared In

ChatDelegates.h

chatDidReceiveMessage:

- (void)chatDidReceiveMessage:(QBChatMessage *)message
Discussion

didReceiveMessage fired when new message was received from QBChat

Parameters

message

Message received from Chat

Declared In

ChatDelegates.h

chatDidReceivePrivacyList:

- (void)chatDidReceivePrivacyList:(QBPrivacyList *)privacyList
Discussion

Called in case receiving privacy list

Parameters

privacyList

list with privacy items

Declared In

ChatDelegates.h

chatDidReceivePrivacyListNames:

- (void)chatDidReceivePrivacyListNames:(NSArray *)listNames
Discussion

Called in case receiving privacy list names

Parameters

listNames

array with privacy list names

Declared In

ChatDelegates.h

chatDidReceiveRejectContactRequestFromUser:

- (void)chatDidReceiveRejectContactRequestFromUser:(NSUInteger)userID
Discussion
  • Called when user has rejected your contact request +
  • @param userID User ID from which rejected your request +

Declared In

ChatDelegates.h

chatDidReceiveSystemMessage:

- (void)chatDidReceiveSystemMessage:(QBChatMessage *)message
Discussion

didReceiveSystemMessage fired when new system message was received from QBChat

Parameters

message

Message received from Chat

Declared In

ChatDelegates.h

chatDidReceiveUserIsTypingFromUserWithID:

- (void)chatDidReceiveUserIsTypingFromUserWithID:(NSUInteger)userID
Discussion

Called when you received a chat status “user is typing”

Parameters

userID

privacy list name

Declared In

ChatDelegates.h

chatDidReceiveUserStopTypingFromUserWithID:

- (void)chatDidReceiveUserStopTypingFromUserWithID:(NSUInteger)userID
Discussion

Called when you received a chat status “user stop typing”

Parameters

userID

privacy list name

Declared In

ChatDelegates.h

chatDidRemovedPrivacyListWithName:

- (void)chatDidRemovedPrivacyListWithName:(NSString *)name
Discussion

Called when you removed a privacy list

Parameters

name

privacy list name

error

Error

Declared In

ChatDelegates.h

chatDidSetActivePrivacyListWithName:

- (void)chatDidSetActivePrivacyListWithName:(NSString *)name
Discussion

Called when you successfully set an active privacy list

Parameters

name

active privacy list name

Declared In

ChatDelegates.h

chatDidSetDefaultPrivacyListWithName:

- (void)chatDidSetDefaultPrivacyListWithName:(NSString *)name
Discussion

Called when you successfully set a default privacy list

Parameters

name

default privacy list name

Declared In

ChatDelegates.h

chatDidSetPrivacyListWithName:

- (void)chatDidSetPrivacyListWithName:(NSString *)name
Discussion

Called when you successfully created/edited a list

Parameters

name

privacy list name

Declared In

ChatDelegates.h

chatRoomDidChangeOnlineUsers:room:

- (void)chatRoomDidChangeOnlineUsers:(NSArray *)onlineUsers room:(NSString *)roomName
Discussion

Called in case changing online users

Warning: Deprecated in QB iOS SDK 2.3: This delegate doesn’t work anymore. Use chatRoomOccupantDidJoin/Leave/Update:toRoomJID: instead.

Parameters

onlineUsers

Array of online users

roomName

Name of room in which have changed online users

Declared In

ChatDelegates.h

chatRoomDidChangeOnlineUsers:roomJID:

- (void)chatRoomDidChangeOnlineUsers:(NSArray *)onlineUsers roomJID:(NSString *)roomJID
Discussion

Called in case changing online users

Warning: Deprecated in QB iOS SDK 2.3: This delegate doesn’t work anymore. Use chatRoomOccupantDidJoin/Leave/Update:toRoomJID: instead.

Parameters

onlineUsers

Array of online users

roomJID

JID of room in which has changed online users list

Declared In

ChatDelegates.h

chatRoomDidEnter:

- (void)chatRoomDidEnter:(QBChatRoom *)room
Discussion

Fired when you did enter to room

Parameters

room

which you have joined

Declared In

ChatDelegates.h

chatRoomDidLeave:

- (void)chatRoomDidLeave:(NSString *)roomName
Discussion

Fired when you did leave room

Warning: Deprecated in QB iOS SDK 2.3: Use chatRoomDidLeaveRoomWithJID: instead.

Parameters

roomName

Name of room which you have leaved

Declared In

ChatDelegates.h

chatRoomDidLeaveRoomWithJID:

- (void)chatRoomDidLeaveRoomWithJID:(NSString *)roomJID
Discussion

Fired when you did leave room

Parameters

roomJID

JID of room which you have leaved

Declared In

ChatDelegates.h

chatRoomDidNotEnter:error:

- (void)chatRoomDidNotEnter:(NSString *)roomName error:(NSError *)error
Discussion

Called when you didn’t enter to room.

Warning: Deprecated in QB iOS SDK 2.3: Use ‘onJoinFailed:’ block in ‘QBChatDialog’.

Parameters

error

Error

room

Name of room which you haven’t joined

Declared In

ChatDelegates.h

chatRoomDidNotEnterRoomWithJID:error:

- (void)chatRoomDidNotEnterRoomWithJID:(NSString *)roomJID error:(NSError *)error
Discussion

Called when you didn’t enter to room

Warning: Deprecated in QB iOS SDK 2.3: Use ‘onJoinFailed:’ block in ‘QBChatDialog’.

Parameters

roomJID

JID of room which you haven’t joined

error

Error

Declared In

ChatDelegates.h

chatRoomDidReceiveListOfOnlineUsers:room:

- (void)chatRoomDidReceiveListOfOnlineUsers:(NSArray *)users room:(NSString *)roomName
Discussion

Called in case receiving list of online users.

Warning: Deprecated in QB iOS SDK 2.3: “Use chatRoomDidReceiveListOfOnlineUsers:roomJID: instead.

Parameters

users

Array of joined users

roomName

Name of room

Declared In

ChatDelegates.h

chatRoomDidReceiveListOfOnlineUsers:roomJID:

- (void)chatRoomDidReceiveListOfOnlineUsers:(NSArray *)users roomJID:(NSString *)roomJID
Discussion

Called in case receiving list of online users

Parameters

users

Array of joined users

roomJID

JID of room

Declared In

ChatDelegates.h

chatRoomDidReceiveMessage:fromRoom:

- (void)chatRoomDidReceiveMessage:(QBChatMessage *)message fromRoom:(NSString *)roomName
Discussion

Called when room received message. It will be fired each time when room received message from any user.

Warning: Deprecated in QB iOS SDK 2.3: Use chatRoomDidReceiveMessage:fromRoomJID: instead.

Parameters

message

Received message

roomName

Name of room which reeived message

Declared In

ChatDelegates.h

chatRoomDidReceiveMessage:fromRoomJID:

- (void)chatRoomDidReceiveMessage:(QBChatMessage *)message fromRoomJID:(NSString *)roomJID
Discussion

Called when room receives a message.

Parameters

message

Received message

roomJID

Room JID

Declared In

ChatDelegates.h

chatRoomOccupantDidJoin:roomJID:

- (void)chatRoomOccupantDidJoin:(NSUInteger)userId roomJID:(NSString *)roomJID
Discussion

Called when user joined room.

Parameters

userId

User’s ID.

roomJID

JID of room.

Declared In

ChatDelegates.h

chatRoomOccupantDidLeave:roomJID:

- (void)chatRoomOccupantDidLeave:(NSUInteger)userId roomJID:(NSString *)roomJID
Discussion

Called when user left room.

Parameters

userId

User’s ID.

roomJID

JID of room.

Declared In

ChatDelegates.h

chatRoomOccupantDidUpdate:roomJID:

- (void)chatRoomOccupantDidUpdate:(NSUInteger)userId roomJID:(NSString *)roomJID
Discussion

Called when user was updated in room.

Parameters

userId

User’s ID.

roomJID

JID of room.

Declared In

ChatDelegates.h