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 whenver contact list was changed.

Declared In

ChatDelegates.h

chatDidAccidentallyDisconnect

- (void)chatDidAccidentallyDisconnect
Discussion

Called whenever QBChat did accidentally disconnect.

Declared In

ChatDelegates.h

chatDidConnect

- (void)chatDidConnect
Discussion

Called whenever QBChat did connect.

Declared In

ChatDelegates.h

chatDidDeliverMessageWithID:dialogID:toUserID:

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

Called whenever message was delivered to user.

Parameters

messageID

Message identifier

dialogID

Dialog identifier

userID

User identifier

Declared In

ChatDelegates.h

chatDidFailWithStreamError:

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

Called whenever QBChat connection error happened.

Parameters

error

XMPPStream Error

Declared In

ChatDelegates.h

chatDidNotConnectWithError:

- (void)chatDidNotConnectWithError:(nullable NSError *)error
Discussion

Called whenever connection process did not finish successfully.

Parameters

error

connection error

Declared In

ChatDelegates.h

chatDidNotReceivePrivacyListNamesDueToError:

- (void)chatDidNotReceivePrivacyListNamesDueToError:(nullable 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:(nullable id)error
Discussion

Called whenever you have failed to receive a list of privacy items.

Parameters

name

privacy list name

error

Error

Declared In

ChatDelegates.h

chatDidNotSetActivePrivacyListWithName:error:

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

Called whenever you have failed to create or edit an active privacy list.

Parameters

name

privacy list name

error

Error

Declared In

ChatDelegates.h

chatDidNotSetDefaultPrivacyListWithName:error:

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

Called whenever you have 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:(nullable id)error
Discussion

Called whenever you have failed to create or edit a privacy list.

Parameters

name

privacy list name

error

Error

Declared In

ChatDelegates.h

chatDidReadMessageWithID:dialogID:readerID:

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

Called whenever message was read by opponent user.

Parameters

messageID

Message identifier

dialogID

Dialog identifier

readerID

Reader user identifier

Declared In

ChatDelegates.h

chatDidReceiveAcceptContactRequestFromUser:

- (void)chatDidReceiveAcceptContactRequestFromUser:(NSUInteger)userID
Discussion

Called whenever user has accepted your contact request.

Parameters

userID

User ID who did accept your contact request

Declared In

ChatDelegates.h

chatDidReceiveContactAddRequestFromUser:

- (void)chatDidReceiveContactAddRequestFromUser:(NSUInteger)userID
Discussion

Called in case contact request was received.

Parameters

userID

User ID from received contact request

Declared In

ChatDelegates.h

chatDidReceiveContactItemActivity:isOnline:status:

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

Called in case when user’s from contact list online status has been changed.

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

Called whenever new private message was received from QBChat.

Note: Will be called only on recipient device

Parameters

message

Message received from Chat

Declared In

ChatDelegates.h

chatDidReceivePresenceWithStatus:fromUser:

- (void)chatDidReceivePresenceWithStatus:(NSString *)status fromUser:(NSInteger)userID
Discussion

Called in case of receiving presence with status.

Parameters

status

Recieved presence status

userID

User ID who did send presence

Declared In

ChatDelegates.h

chatDidReceivePrivacyList:

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

Called in case of receiving privacy list.

Parameters

privacyList

list with privacy items

Declared In

ChatDelegates.h

chatDidReceivePrivacyListNames:

- (void)chatDidReceivePrivacyListNames:(NSArray<NSString*> *)listNames
Discussion

Called in case of receiving privacy list names.

Parameters

listNames

array with privacy list names

Declared In

ChatDelegates.h

chatDidReceiveRejectContactRequestFromUser:

- (void)chatDidReceiveRejectContactRequestFromUser:(NSUInteger)userID
Discussion

Called whenever user has rejected your contact request.

Parameters

userID

User ID who did reject your contact reqiest

Declared In

ChatDelegates.h

chatDidReceiveSystemMessage:

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

Called whenever new system message was received from QBChat.

Note: Will be called only on recipient device

Parameters

message

Message that was received from Chat

Declared In

ChatDelegates.h

chatDidReconnect

- (void)chatDidReconnect
Discussion

Called after successful connection to chat after disconnect.

Declared In

ChatDelegates.h

chatDidRemovedPrivacyListWithName:

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

Called whenever you have removed a privacy list.

Parameters

name

privacy list name

Declared In

ChatDelegates.h

chatDidSetActivePrivacyListWithName:

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

Called whenever you have successfully set an active privacy list.

Parameters

name

active privacy list name

Declared In

ChatDelegates.h

chatDidSetDefaultPrivacyListWithName:

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

Called whenever you have successfully set a default privacy list.

Parameters

name

default privacy list name

Declared In

ChatDelegates.h

chatDidSetPrivacyListWithName:

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

Called whenever you have successfully created or edited a list.

Parameters

name

privacy list name

Declared In

ChatDelegates.h

chatRoomDidReceiveMessage:fromDialogID:

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

Called whenever group chat dialog did receive a message.

Note: Will be called on both recepients' and senders' device (with corrected time from server)

Parameters

message

Received message.

dialogID

QBChatDialog identifier.

Declared In

ChatDelegates.h