This repository was archived by the owner on Jul 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAAClientLib.h
More file actions
70 lines (50 loc) · 2.18 KB
/
AAClientLib.h
File metadata and controls
70 lines (50 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//
// AAClientLib.h
// AAClientLib
//
// Created by Andreas Weinlein on 12.12.12.
// Copyright (c) 2012 Andreas Weinlein. All rights reserved.
//
#import <Foundation/Foundation.h>
extern NSString *const AACResultTypeAppArchive;
extern NSString *const AACResultTypeCriteria;
extern NSString *const AACResultTypeScreenshot;
extern NSString *const AACResultTypeTcpdump;
extern NSString *const AACResultTypeStackTrace;
extern NSString *const AACResultTypeMethodCoverage;
extern NSString *const AACResultTypeString;
extern NSString *const AACNotificationAppExecutionStarted;
extern NSString *const AACNotificationAppExecutionFinished;
@interface NSDictionary(AAClientLib)
- (NSString *) runId;
- (NSString *) backendURL;
@end
@interface AAClientLib : NSObject
+ (AAClientLib*)sharedInstance;
//result has to be JSONSerializable
- (BOOL)saveResult:(id)result;
- (BOOL)saveResult:(id)result withType:(NSString*)type;
- (BOOL)saveResult:(id)result withType:(NSString*)type andTaskInfo:(NSDictionary*)taskInfo;
- (NSMutableURLRequest *)requestForResult:(id)result withType:(NSString *)type andTaskInfo:(NSDictionary*)taskInfo;
/*
* All added blocks will be called after the corresponding event occured.
* BEWARE: They will not be removed after a succesfull execution!!!
* See AAPilotNotification.h for valid notifications and details
*/
- (void)registerForNotification:(NSString*)notification withBlock:(void(^)(void))block;
- (void)registerForAppExecutionRequestStartNotificationWithBlock:(void(^)(NSString *bundleId))block;
//set execution state
//set state to execution started. If scheduleRunning == TRUE, keep-alive messages will be sent to avoid timeouts
- (void)setAppExecutionHasStartedAndAutoScheduleSetRunning:(BOOL)scheduleRunning;
// set state to running. Will reset the timeout once
- (void)setAppExecutionRunning;
// set the state to finished
- (void)setAppExecutionHasFinished;
// request the execution of the app specified by the given bundleId
- (void)requestAppExecution:(NSString*)bundleId;
//get the current taskInfo dict
- (NSDictionary*)taskInfo;
@property(readonly) BOOL executionStartRequested;
@property(readonly) BOOL executionStarted;
@property(readonly) BOOL executionFinishRequested;
@end