OOAuthorizableItem.h
1 #import <Foundation/Foundation.h>
2 #import "OOReturnState.h"
3 
7 typedef NS_ENUM(NSInteger, OOAuthCode) {
8  OOAuthCodeUnknown = -2,
9  OOAuthCodeNotRequested = -1,
10  OOAuthCodeMin = 0,
11  OOAuthCodeAuthorized = 0,
12  OOAuthCodeUnauthorizedParent = 1,
13  OOAuthCodeUnauthorizedDomain = 2,
14  OOAuthCodeUnauthorizedLocation = 3,
15  OOAuthCodeBeforeFlightTime = 4,
16  OOAuthCodeAfterFlightTime = 5,
17  OOAuthCodeOutsideRecurringFlightTimes = 6,
18  OOAuthCodeBadEmbedCode = 7 ,
19  OOAuthCodeInvalidSignature = 8,
20  OOAuthCodeMissingParams = 9,
21  OOAuthCodeMissingRuleSet = 10,
22  OOAuthCodeUnauthorized = 11,
23  OOAuthCodeMissingPcode = 12,
24  OOAuthCodeUnauthorizedDevice = 13,
25  OOAuthCodeInvalidToken = 14,
26  OOAuthCodeTokenExpired = 15,
27  OOAuthCodeUnauthorizedMultiSyndGroup = 16,
28  OOAuthCodeProviderDeleted = 17,
29  OOAuthCodeTooManyActiveStreams = 18,
30  OOAuthCodeMissingAccountId = 19,
31  OOAuthCodeNoEntitlementsFound = 20,
32  OOAuthCodeNonEntitledDevice = 21,
33  OOAuthCodeNonRegisteredDevice = 22,
34  OOAuthCodeProviderOverCapTrial = 23,
35  OOAuthCodeProxyDetected = 24,
36  OOAuthCodeMax = 24
37 };
38 
42 @protocol OOAuthorizableItem <NSObject>
43 
49 - (OOReturnState)updateWithDictionary:(NSDictionary *)data;
50 
55 - (NSArray *)embedCodesToAuthorize;
56 
61 - (BOOL)authorized;
62 
67 - (OOAuthCode)authCode;
68 
69 @property (nonatomic, assign) BOOL heartbeatRequired;
70 
71 @end