1 #ifndef LocalKeychainAnalytics_h
2 #define LocalKeychainAnalytics_h
4 #include <CoreFoundation/CoreFoundation.h>
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
;
25 LKAKeychainBackupTypeNeither
,
26 LKAKeychainBackupTypeBag
,
27 LKAKeychainBackupTypeCode
,
28 LKAKeychainBackupTypeBagAndCode
,
29 LKAKeychainBackupTypeEMCS
,
30 } LKAKeychainBackupType
;
32 void LKAReportKeychainUpgradeOutcome(int fromversion
, int toversion
, LKAKeychainUpgradeOutcome outcome
);
33 void LKAReportKeychainUpgradeOutcomeWithError(int fromversion
, int toversion
, LKAKeychainUpgradeOutcome outcome
, CFErrorRef error
);
35 void LKABackupReportStart(bool hasKeybag
, bool hasPasscode
, bool isEMCS
);
36 void LKABackupReportEnd(bool hasBackup
, CFErrorRef error
);
40 #import <Foundation/Foundation.h>
41 #import <Security/SFAnalytics.h>
43 typedef NSString
* LKAnalyticsFailableEvent NS_STRING_ENUM
;
44 typedef NSString
* LKAnalyticsMetric NS_STRING_ENUM
;
46 extern LKAnalyticsFailableEvent
const LKAEventUpgrade
;
48 @interface LocalKeychainAnalytics
: SFAnalytics
50 - (void)reportKeychainUpgradeFrom
:(int)oldVersion to
:(int)newVersion outcome
:(LKAKeychainUpgradeOutcome
)result error
:(NSError
*)error
;
55 #endif // LocalKeychainAnalytics_h