Bold360 and BoldChat Developer Center

BCChatSession.h

1 //
2 // Copyright (c) 2014 LogMeIn Inc. All rights reserved.
3 //
4 
5 #import <Foundation/Foundation.h>
6 #import "BCUnavailableReason.h"
7 #import "BCChat.h"
8 #import "BCSubmitUnavailableEmailDelegate.h"
9 #import "BCErrorCodes.h"
10 #import "BCCancelable.h"
11 #import "BCSubmitPreChatDelegate.h"
12 #import "BCSubmitPostChatDelegate.h"
13 #import "BCEmailChatHistoryDelegate.h"
14 #import "BCChangeLanguageDelegate.h"
15 #import "BCChatRecaptureDelegate.h"
16 
17 @protocol BCChatSession;
18 @protocol BCChat;
19 @class BCForm;
20 @class BCPerson;
21 
29 @protocol BCChatSession <NSObject>
30 
35 @property(nonatomic, assign) id<BCChatRecaptureDelegate> chatRecaptureDelegate;
36 
42 @property (nonatomic, copy, readonly) NSString *language;
43 
48 @property (nonatomic, copy, readonly) NSString *departmentId;
49 
54 @property (nonatomic, copy, readonly) NSString *chatKey;
55 
60 @property (nonatomic, strong, readonly) BCPerson *visitor;
61 
66 @property (nonatomic, readonly) BOOL recaptureAvailable;
67 
72 @property (nonatomic, readonly) BCChatEndReason endReason;
73 
78 @property (nonatomic, readonly) BCUnavailableReason unavailableReason;
79 
84 @property (nonatomic, readonly) NSString *unavailableMessage;
85 
90 @property (nonatomic, readonly) BCForm *preChatForm;
91 
96 @property (nonatomic, readonly) BCForm *postChatForm;
97 
102 @property (nonatomic, readonly) BCForm *unavailableForm;
103 
108 @property (nonatomic, readonly)id<BCChat> chat;
109 
114 @property (nonatomic, copy, readonly)NSDictionary *branding;
115 
120 - (void)finishChatSession;
121 
126 - (void)suspend;
127 
132 - (void)resume;
133 
141 - (id<BCCancelable>)submitUnavailableEmail:(BCForm *)unavailableForm delegate:(id<BCSubmitUnavailableEmailDelegate>)submitUnavailableEmailDelegate;
142 
150 - (id<BCCancelable>)submitPreChat:(BCForm *)preChatForm andStartChatWithDelegate:(id<BCSubmitPreChatDelegate>)submitPreChatDelegate;
151 
159 - (id<BCCancelable>)submitPostChat:(BCForm *)postChatForm delegate:(id<BCSubmitPostChatDelegate>)submitPostChatDelegate;
160 
168 - (id<BCCancelable>)emailChatHistory:(NSString *)emailAddress delegate:(id<BCEmailChatHistoryDelegate>)emailChatHistoryDelegate;
169 
177 - (id<BCCancelable>)changeLanguage:(NSString *)languageString delegate:(id<BCChangeLanguageDelegate>)changeLanguageDelegate;
178 
179 @end
An entity participating in the chat. It can be either a visitor, an operator or the system...
Definition: BCPerson.h:24
BCForm * unavailableForm
The unavailable chat form. It is filled only when it is needed to be displayed.
Definition: BCChatSession.h:102
NSString * unavailableMessage
If the chat is unavailable it has the textural description of unavailability.
Definition: BCChatSession.h:84
BCUnavailableReason unavailableReason
If the chat is unavailable, this value shows the cause of unavailability.
Definition: BCChatSession.h:78
NSDictionary * branding
A dictionary that contains the localized strings for the current set language.
Definition: BCChatSession.h:114
The callbacks for the result of BCChatSession::submitUnavailableEmail:delegate: . ...
Definition: BCSubmitUnavailableEmailDelegate.h:13
The callbacks for the result of BCChatSession::emailChatHistory:delegate: .
Definition: BCEmailChatHistoryDelegate.h:13
A protocol for canceling asynchronous requests.
Definition: BCCancelable.h:11
BCChatEndReason endReason
The end reason of the chat if the chat ended.
Definition: BCChatSession.h:72
BCForm * preChatForm
The pre-chat form for the current chat session. It is filled on chat creation if there is pre-chat de...
Definition: BCChatSession.h:90
Container class for holding the information related to showing a form such as the pre chat...
Definition: BCForm.h:12
BCForm * postChatForm
The post chat form for the current chat session. It is filled after the chat ended.
Definition: BCChatSession.h:96
BOOL recaptureAvailable
If the visitor was shown the unavailable chat form, this value shows if an operator became available ...
Definition: BCChatSession.h:66
The callbacks for the result of BCChatSession::submitPostChat:delegate: .
Definition: BCSubmitPostChatDelegate.h:13
void suspend()
Suspends the current session. It needs to be called when the application goes to background.
NSString * language
Current language string.
Definition: BCChatSession.h:42
NSString * departmentId
The Department ID.
Definition: BCChatSession.h:48
The callbacks for the result of BCChatSession::submitPreChat:andStartChatWithDelegate: ...
Definition: BCSubmitPreChatDelegate.h:17
void finishChatSession()
Stop and finish of the current session. It can be called any time to cancel and close the session...
id< BCChat > chat
The chat instance for sending and receiving chat messages. It is set only when the chat is available...
Definition: BCChatSession.h:108
The main class protocol that is used to interact with an active chat session.
Definition: BCChatSession.h:29
NSString * chatKey
The chat key of the current chat session. It gets a valid value, when the chat is created...
Definition: BCChatSession.h:54
A protocol of an object that sends and receives chat messages, states and events. ...
Definition: BCChat.h:21
BCPerson * visitor
The person object of the current visitor. It is autogenerated with the visitorId given on creation...
Definition: BCChatSession.h:60
id< BCChatRecaptureDelegate > chatRecaptureDelegate
While the user fills the unavailable chat form, an operator can become active. This delegate is used ...
Definition: BCChatSession.h:35
The callbacks for the result of BCChatSession::changeLanguage:delegate: .
Definition: BCChangeLanguageDelegate.h:13
void resume()
Resumes the suspended session. It needs to be called if the application resumes from background state...