Mobile API Reference  MicroStrategy 2019
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PromptHelper.h
Go to the documentation of this file.
1 //
2 // PromptHelper.h
3 // MSTRMobile
4 //
5 // Created by Amirali Charania on 1/16/10.
6 // Copyright 2010 MicroStrategy. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import <CoreLocation/CoreLocation.h>
11 #import "MSIServiceImpl.h"
15 #import <MapKit/MapKit.h>
16 
18 {
23  PromptAnswerStatusUnchanged = 3//by lishan 664123
25 
28 @class MSIPrompt;
29 
31 
32 - (void)updatePromptedReport:(MSIReportDisplayInfo*)report;
33 - (UIViewController*)viewController;
34 - (void)addBackgroundCoveringViewAfterPrompt:(UIView *)ipView
35  belowSubview:(UIView *) ipSiblingView;
36 
37 @optional
38 
39 //TQMS:438696, we have to hide the right navigation bar item when start reprompt and restore it when cancel the prompt summary screen
40 - (void)onPromptScreenClosed:(int)status;
41 - (void)onPromptScreenPopsUp;
42 - (void)willPopViewController;
43 - (id)getCurrentViewer;
44 @end
45 
46 
47 
91 
92 @interface PromptHelper : NSObject <ServiceHandler, CalendarDelegate, CLLocationManagerDelegate, MKMapViewDelegate, BarcodeScannerControllerDelegate, KeypadInputControllerDelegate> {
94  NSInteger currentPromptIndex;
99  id<PromptHelperDelegate> __weak delegate;
100  UIViewController *currentController;
103  NSMutableArray *prevPromptAnswers;
104  NSMutableArray *prevConstantPromptAnswers; //to understand if any constant prompt answer has been changed
105  PromptsService* promptsService;
107  NSThread *currentThread;
110  NSDictionary *answerModes;
111  CLLocationManager *locationManager;
112  MKMapView *locationHelperMap;
122  UIColor* accentColor;
123 }
124 
125 - (id)initWithPrompts:(Prompts*)prompts;
126 - (Prompts*) prompts;
127 - (void) setPrompts: (Prompts*)p;
131 - (void) displayElementListScreen: (MSIObjectInfo*) promptAttribute parentViewController: (UIViewController*) parent;
132 
136 - (void) displayCustomPromptScreenWithParentViewController: (UIViewController*) parent;
137 
138 - (void) storePersonalization:(NSMutableArray*)elements dismissPreviousView:(BOOL)iDismiss;
139 
143 - (void) validateCustomSaveAndDismissPreviousView: (BOOL) dismiss;
144 
145 - (MSIProjectConfiguration*) project;
146 
151 - (void) displayPrompt: (BOOL) animate;
152 - (EnumPromptAnswerStatus)getCurrentPromptAnswerStatus;
153 - (BOOL)validatePromptAnswer:(MSIPrompt *)curPrompt;
154 - (BOOL)validateConstantLocationPromptAnswers;
155 - (void)barcodeScannerDone:(NSString *)newSelection;
156 - (void) elementSelectionDone;
157 - (void) elementSelectionCancelled;
158 - (void)displayPromptAtIndex:(NSInteger)index;
159 - (void)savePromptAnswers;
160 - (void)saveAnswersAndDisplayReport;
161 - (BOOL)didElementsChange:(NSMutableArray *)elements;
162 - (void)saveExistingPromptAnswers;
163 - (BOOL)promptAnswersChanged;
164 - (void)saveExistingConstantPromptAnswers;
165 - (BOOL)constantPromptAnswersChanged;
166 - (void)locationUpdated:(CLLocation *)newLocation;
167 - (NSArray *)locationFromConstantPrompts;
168 - (void)displayCalendar:(MSIConstantPrompt*)curPrompt;
169 - (BOOL)shouldDisplayDateTime:(MSIPrompt *)curPrompt;
170 - (void)cancelPrompts;
171 - (void)doneSummaryPrompts;
172 - (void)cancelModalPrompts;
173 - (void)displayBarcodeScanner:(MSIConstantPrompt *)curPrompt;
174 - (void)displayPromptsFromCache:(Prompts *)data;
175 - (void)completeSaveAndDisplay;
176 - (void)cancelRunningThread;
177 + (void)setBarcodeXmlValue:(NSString*)value prompt:(MSIConstantPrompt*)curPrompt;
178 + (NSString*)getBarcodeValue:(MSIConstantPrompt*)curPrompt;
179 - (void)displayWaitView;
180 - (void)hideWaitView;
181 
182 - (void)calendarCanceled;
183 - (void)expressionEditingDone;
184 - (MIPromptViewController*)getPromptViewController;
185 + (BOOL)isPromptInPrompt:(Prompts *)prompts inDocument:(MSIReportDisplayInfo *)document;
186 - (BOOL)isPromptInPromptInDocument:(MSIReportDisplayInfo *)document;
187 - (void)setCurrentPrompt:(MSIPrompt*)prompt;
188 - (NSArray *)getCachedPrompts;
189 @property (nonatomic, strong) MSIReportDisplayInfo* report;
190 @property BOOL multiSelect;
191 @property BOOL searchRequired;
192 @property (nonatomic, strong) PromptSelectorController* currentSelectorController;
193 @property (readonly) NSInteger currentPromptIndex;
194 @property (nonatomic, strong) MSIObjectInfo* attribute;
195 @property (nonatomic, weak) id<PromptHelperDelegate> delegate;
196 
197 @property (nonatomic, strong) UIViewController *currentController;
198 @property BOOL animateInitially;
199 @property BOOL anyPromptAnswerChanged;
200 @property (readonly) PromptsService* promptsService;
201 @property (nonatomic, strong) NSThread *currentThread;
202 @property BOOL isReprompt;
203 @property BOOL isLinkDrill;
204 @property (nonatomic, copy) NSDictionary* answerModes;
205 @property BOOL containsLocationPrompt;
206 @property (readonly) BOOL currentlyAnsweringLocPrompts;
207 @property (readonly) NSInteger currentLocErrorCode;
208 @property (readonly) BOOL isAutoDisplayDetails;
209 @property (nonatomic) ThemeType themetype;
210 @property (nonatomic, copy) UIColor* accentColor;
211 @property BOOL isBackgroundNavigationBarHidden;
212 @end
BOOL multiSelect
Definition: PromptHelper.h:97
signed char BOOL
Definition: PDCwtypes.h:101
Definition: MSIPrompt.h:34
Definition: PromptHelper.h:92
MKMapView * locationHelperMap
Definition: PromptHelper.h:112
Definition: SelectedElementListController.h:13
Definition: MSIReportDisplayInfo.h:91
enum _EnumPromptAnswerStatus EnumPromptAnswerStatus
Definition: MSIObjectInfo.h:22
UIViewController * viewController()
Definition: PromptHelper.h:20
MSIReportDisplayInfo * report
Definition: PromptHelper.h:93
Definition: PromptHelper.h:23
id< PromptHelperDelegate > __weak delegate
Definition: PromptHelper.h:99
Definition: PromptSelectorController.h:20
Definition: PromptHelper.h:21
Definition: PromptHelper.h:19
BOOL anyPromptAnswerChanged
Definition: PromptHelper.h:102
BOOL isAutoDisplayDetails
Definition: PromptHelper.h:119
NSMutableArray * prevPromptAnswers
Definition: PromptHelper.h:103
Definition: Prompts.h:30
NSInteger currentPromptIndex
Definition: PromptHelper.h:94
Definition: PromptHelper.h:22
Definition: MSIConstantPrompt.h:17
Definition: MSIProjectConfiguration.h:20
BOOL isReprompt
Definition: PromptHelper.h:108
EnumPromptAnswerStatus currentPromptAnswerStatus
Definition: PromptHelper.h:117
Definition: MIPromptViewController.h:20
MIPromptViewController * mpPromptViewController
Definition: PromptHelper.h:101
Definition: MSICalendarViewController.h:46
BOOL isLinkDrill
Definition: PromptHelper.h:109
PromptSelectorController * currentSelectorController
Definition: PromptHelper.h:116
ThemeType themetype
Definition: PromptHelper.h:120
UIColor * accentColor
Definition: PromptHelper.h:122
BOOL animateInitially
Definition: PromptHelper.h:106
NSInteger currentLocErrorCode
Definition: PromptHelper.h:113
Prompts * promptCache
Definition: PromptHelper.h:96
Definition: PromptHelper.h:30
NSThread * currentThread
Definition: PromptHelper.h:107
BOOL searchRequired
Definition: PromptHelper.h:98
_EnumPromptAnswerStatus
Definition: PromptHelper.h:17
Definition: ElementListController.h:23
MSIObjectInfo * attribute
Definition: PromptHelper.h:95
BOOL isBackgroundNavigationBarHidden
Definition: PromptHelper.h:121
enum _ThemeType ThemeType
CLLocationManager * locationManager
Definition: PromptHelper.h:111
NSMutableArray * prevConstantPromptAnswers
Definition: PromptHelper.h:104
UIView * backgroundCoveringView
Definition: PromptHelper.h:118
NSDictionary * answerModes
Definition: PromptHelper.h:110
BOOL currentlyAnsweringLocPrompts
Definition: PromptHelper.h:114
UIViewController * currentController
Definition: PromptHelper.h:100
PromptsService * promptsService
Definition: PromptHelper.h:105
BOOL containsLocationPrompt
Definition: PromptHelper.h:115