]> git.saurik.com Git - apple/security.git/blob - Analytics/Clients/LocalKeychainAnalytics.h
Security-58286.240.4.tar.gz
[apple/security.git] / Analytics / Clients / LocalKeychainAnalytics.h
1 #ifndef LocalKeychainAnalytics_h
2 #define LocalKeychainAnalytics_h
3
4 #include <CoreFoundation/CoreFoundation.h>
5
6 typedef enum {
7 LKAKeychainUpgradeOutcomeSuccess,
8 LKAKeychainUpgradeOutcomeUnknownFailure,
9 LKAKeychainUpgradeOutcomeLocked,
10 LKAKeychainUpgradeOutcomeInternal,
11 LKAKeychainUpgradeOutcomeNewDb,
12 LKAKeychainUpgradeOutcomeObsoleteDb,
13 LKAKeychainUpgradeOutcomeNoSchema,
14 LKAKeychainUpgradeOutcomeIndices,
15 LKAKeychainUpgradeOutcomePhase1AlterTables,
16 LKAKeychainUpgradeOutcomePhase1DropIndices,
17 LKAKeychainUpgradeOutcomePhase1CreateSchema,
18 LKAKeychainUpgradeOutcomePhase1Items,
19 LKAKeychainUpgradeOutcomePhase1NonItems,
20 LKAKeychainUpgradeOutcomePhase1DropOld,
21 LKAKeychainUpgradeOutcomePhase2,
22 } LKAKeychainUpgradeOutcome;
23
24 void LKAReportKeychainUpgradeOutcome(int fromversion, int toversion, LKAKeychainUpgradeOutcome outcome);
25 void LKAReportKeychainUpgradeOutcomeWithError(int fromversion, int toversion, LKAKeychainUpgradeOutcome outcome, CFErrorRef error);
26
27 #if __OBJC2__
28
29 #import <Foundation/Foundation.h>
30 #import <Security/SFAnalytics.h>
31
32 typedef NSString* LKAnalyticsFailableEvent NS_STRING_ENUM;
33 extern LKAnalyticsFailableEvent const LKAEventUpgrade;
34
35 @interface LocalKeychainAnalytics : SFAnalytics
36
37 - (void)reportKeychainUpgradeFrom:(int)oldVersion to:(int)newVersion outcome:(LKAKeychainUpgradeOutcome)result error:(NSError*)error;
38
39 @end
40
41 #endif // OBJC2
42 #endif // LocalKeychainAnalytics_h