33 #import <Foundation/Foundation.h>
38 #import "AMLoginView.h"
39 #import "AMRequestURL.h"
43 #define AM_DEFAULT_OAUTH_HOST @"https://auth.accela.com"
44 #define AM_DEFAULT_API_HOST @"https://apis.accela.com"
50 @protocol AMProgressDelegate;
53 extern NSString *AccelaMobileVersion;
59 ENVIRONMENT_STAGE = 3,
60 ENVIRONMENT_CONFIG = 4,
77 - (id)initWithKey: (NSString *) key;
93 @property (nonatomic,retain) NSString *operationKey;
100 @property (nonatomic,retain) NSMutableDictionary *body;
107 @property (nonatomic,retain) NSMutableDictionary *criteria;
114 @property (nonatomic,retain) NSMutableArray *elements;
124 id<AMSessionDelegate> _sessionDelegate;
128 NSDictionary *_userProfile;
136 @property(nonatomic, assign) id<AMSessionDelegate> sessionDelegate;
143 @property (nonatomic, retain) NSString *amClientId;
150 @property (nonatomic, retain) NSString *amClientSecret;
157 @property (nonatomic,readonly) NSString *amAuthHost;
164 @property (nonatomic,readonly) NSString *amApiHost;
172 @property (nonatomic, retain) NSDictionary *userProfile;
180 @property (nonatomic, retain) NSDictionary *httpHeaders;
187 @property(nonatomic,setter = setEnvType:) ENVIRONMENT_TYPE amEnvironmentType;
194 @property (nonatomic, setter = setAmIsRemember:, getter = getAmIsRemember) BOOL amIsRemember;
207 - (id)initWithAppId: (NSString *)appId withAppSecret:(NSString *)appSecret;
224 - (id)initWithAppId: (NSString *)appId withAppSecret:(NSString *)appSecret withAuthHost:(NSString *)authHost withApiHost:(NSString *)apiHost;
240 - (id)initWithAppId: (NSString *)appId withAppSecret:(NSString *)appSecret andDelegate:(
id<
AMSessionDelegate>)delegate;
259 - (id)initWithAppId: (NSString *)appId withAppSecret:(NSString *)appSecret andDelegate:(
id<
AMSessionDelegate>)delegate withAuthHost:(NSString *)authHost withApiHost:(NSString *)apiHost;
276 - (void)authorize:(NSArray *) permissions;
294 - (void)authorize:(NSArray *) permissions withAgency:(NSString *) agency;
307 -(BOOL) handleOpenURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(
id)annotation;
314 - (void)handleDidBecomeActive;
330 - (void)authenticate: (NSString *)agency user: (NSString *)user password: (NSString *)password loginDialogDelegate: (
id<
AMLoginDialogDelegate>) loginDialogDelegate NS_DEPRECATED_IOS(2_0, 5_0);
341 - (void) authorizeAgencyApp:(NSArray *)permissions NS_DEPRECATED_IOS(2_0, 5_0);
359 - (void)authorize2:(NSArray *) permissions;
379 - (void)authorize2:(NSArray *) permissions withAgency:(NSString *) agency;
389 - (BOOL)isSessionValid;
411 - (id)fetchWithPath: (NSString *)servicePath urlParams: (NSDictionary *)params error: (AMErrorBlock)errorBlock;
433 - (id)fetchWithPath: (NSString *)servicePath
434 urlParams: (NSMutableDictionary *)params
435 httpMethod: (HTTP_METHOD)httpMethod
437 error: (AMErrorBlock)errorBlock;
454 - (
AMRequest*)requestWithPath: (NSString *)servicePath
455 urlParams: (NSDictionary *)params
473 - (
AMRequest*)requestWithPath: (NSString *)servicePath
474 urlParams: (NSDictionary *)params
475 httpMethod: (HTTP_METHOD)httpMethod
495 -(
AMRequest*)requestWithPath:(NSString *) servicePath
496 urlParams:(NSDictionary *)params
497 httpMethod:(HTTP_METHOD) httpMethod
498 data:(NSString *) data
499 attachments:(NSDictionary *) attachments
517 - (
AMRequest*)uploadAttachment: (NSString *)servicePath
518 urlParams: (NSDictionary *)params
519 attachment: (NSDictionary *)fileInformation
537 - (
AMRequest*)downloadAttachment: (NSString *)servicePath
538 urlParams: (NSDictionary *)params
539 localPath: (NSString *)localFile
558 -(
AMRequest*)downloadAttachment:(NSString *)servicePath
559 urlParams: (NSDictionary *)params
560 httpMethod:(HTTP_METHOD) httpMethod
561 postData:(NSString *) data
562 localPath: (NSString *)localFile
592 -(void)amDidLogin:(
int) grantType;
606 -(void)amDidLoginFailure:(
AMError *)error;
615 -(BOOL)amDidSessionInvalid:(
AMError *)error;
657 - (void)amDialogNotLogin: (BOOL)cancelled;
666 - (void)amDialogLoginFailure:(
AMError *)error;
Definition: AccelaMobile.h:582
NSMutableDictionary * criteria
Definition: AccelaMobile.h:68
NSMutableArray * elements
Definition: AccelaMobile.h:69
Definition: AccelaMobile.h:122
Definition: AMRequest.h:42
Definition: AccelaMobile.h:637
NSString * operationKey
Definition: AccelaMobile.h:66
NSMutableDictionary * body
Definition: AccelaMobile.h:67
Definition: AccelaMobile.h:65
Definition: AMRequest.h:282