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

Warning: Deprecated in 2.4. Use ‘chatDidDeliverMessageWithID:dialogID:toUserID:’ instead.

Parameters

messageID

ID of an original message

Declared In

ChatDelegates.h

chatDidDeliverMessageWithID:dialogID:toUserID:

- (void)chatDidDeliverMessageWithID:(NSString *)messageID dialogID:(NSString *)dialogID toUserID:(NSUInteger)userID
Discussion

Called when message is delivered to user.

Parameters

messageID

Message identifier.

dialogID

Dialog identifier.

readerID

User identifier.

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

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:toDialogID:error:

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

Fired when message cannot be send to the group chat.

Parameters

message

QBChatMessage message.

dialogID

QBChatDialog identifier.

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.

Warning: Deprecated in 2.4. Use ‘chatDidReadMessageWithID:dialogID:readerID:’ instead.

Parameters

messageID

ID of an original message

Declared In

ChatDelegates.h

chatDidReadMessageWithID:dialogID:readerID:

- (void)chatDidReadMessageWithID:(NSString *)messageID dialogID:(NSString *)dialogID readerID:(NSUInteger)readerID
Discussion

Called when message is read by opponent.

Parameters

messageID

Message identifier.

dialogID

Dialog identifier.

readerID

Reader identifier.

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”

Warning: Deprecated in 2.4. Use ‘onUserIsTyping:’ block in ‘QBChatDialog’.

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”

Warning: Deprecated in 2.4. Use ‘onUserStoppedTyping:’ block in ‘QBChatDialog’.

Parameters

userID

privacy list name

Declared In

ChatDelegates.h

chatDidReconnect

- (void)chatDidReconnect
Discussion

Fired after successful connection to stream after disconnect.

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

chatRoomDidReceiveListOfOnlineUsers:dialogID:

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

Called in case of receiving list of online users in dialog.

Warning: Deprecated in 2.4. Use QBChatDialog ‘setOnReceiveListOfOnlineUsers:’ block instead.

Parameters

users

Array of joined users.

dialogID

QBChatDialog identifier.

Declared In

ChatDelegates.h

chatRoomDidReceiveMessage:fromDialogID:

- (void)chatRoomDidReceiveMessage:(QBChatMessage *)message fromDialogID:(NSString *)dialogID
Discussion

Called when dialog receives message.

Parameters

message

Received message.

dialogID

QBChatDialog identifier.

Declared In

ChatDelegates.h

chatRoomOccupantDidJoin:dialogID:

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

Called when user joined dialog.

Warning: Deprecated in 2.4. Use QBChatDialog ‘onJoinOccupant’ block instead.

Parameters

userId

User’s ID.

dialogID

QBChatDialog identifier.

Declared In

ChatDelegates.h

chatRoomOccupantDidLeave:dialogID:

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

Called when user left dialog.

Warning: Deprecated in 2.4. Use QBChatDialog ‘onLeaveOccupant’ block instead.

Parameters

userId

User’s ID.

dialogID

QBChatDialog identifier.

Declared In

ChatDelegates.h

chatRoomOccupantDidUpdate:dialogID:

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

Called when user was updated in dialog.

Warning: Deprecated in 2.4. Use QBChatDialog ‘onUpdateOccupant’ block instead.

Parameters

userId

User’s ID.

dialogID

QBChatDialog identifier.

Declared In

ChatDelegates.h