Bold360 and BoldChat Developer Center

BCChat.h

1 //
2 // Copyright (c) 2014 LogMeIn Inc. All rights reserved.
3 //
4 
5 #import <Foundation/Foundation.h>
6 #import "BCChatTyperDelegate.h"
7 #import "BCChatMessageDelegate.h"
8 #import "BCChatQueueDelegate.h"
9 #import "BCChatStateDelegate.h"
10 #import "BCErrorCodes.h"
11 
12 @protocol BCChat;
13 @class BCMessage;
14 @class BCPerson;
15 
21 @protocol BCChat <NSObject>
22 
27 @property (nonatomic, readonly)NSArray *messages;
28 
34 @property (nonatomic, readonly)BCMessage *currentSystemMessage;
35 
40 @property(nonatomic, readonly)BCMessage *currentAutoMessage;
41 
42 
47 @property (nonatomic, readonly)long long lastChatMessageId;
48 
53 @property (nonatomic, readonly)BCPerson *visitor;
54 
59 - (void)addChatTyperDelegate:(id<BCChatTyperDelegate>)delegate;
60 
65 - (void)removeChatTyperDelegate:(id<BCChatTyperDelegate>)delegate;
66 
71 - (void)addChatMessageDelegate:(id<BCChatMessageDelegate>)delegate;
72 
77 - (void)removeChatMessageDelegate:(id<BCChatMessageDelegate>)delegate;
78 
83 - (void)addChatQueueDelegate:(id<BCChatQueueDelegate>)delegate;
84 
89 - (void)removeChatQueueDelegate:(id<BCChatQueueDelegate>)delegate;
90 
95 - (void)addChatStateDelegate:(id<BCChatStateDelegate>)delegate;
96 
101 - (void)removeChatStateDelegate:(id<BCChatStateDelegate>)delegate;
102 
107 - (void)finishChat;
108 
114 
120 - (void)sendMessage:(BCMessage *)message;
121 
128 - (BCMessage *)sendMessageText:(NSString *)messageText;
129 
135 - (void)sendVisitorTyping:(BOOL)visitorTyping;
136 
137 @end
An entity participating in the chat. It can be either a visitor, an operator or the system...
Definition: BCPerson.h:24
BCMessage * currentSystemMessage
The auto or system message for the current state. It can occur if the user started a chat but it was ...
Definition: BCChat.h:34
NSArray * messages
The list of messages that were sent by the operator and the visitor in timed order. It is an array of BCMessage objects.
Definition: BCChat.h:27
The delegate that is called back on chat state changes.
Definition: BCChatStateDelegate.h:28
long long lastChatMessageId
The id of the last chat message received from the server.
Definition: BCChat.h:47
BOOL finishChatToAnswerUnavailableForm()
Finish the chat and gather unavailable chat form to answer it.
BCMessage * currentAutoMessage
Definition: BCChat.h:40
BCPerson * visitor
The current visitor data.
Definition: BCChat.h:53
The delegate for callback about the queue position of the visitor.
Definition: BCChatQueueDelegate.h:11
A protocol of an object that sends and receives chat messages, states and events. ...
Definition: BCChat.h:21
Callbacks on typing events.
Definition: BCChatTyperDelegate.h:15
Callbacks on message departures and arrivals.
Definition: BCChatMessageDelegate.h:15
void finishChat()
Finish the chat and answer post chat if available.
The container class for all information about a specific chat message.
Definition: BCMessage.h:13