| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_ | 5 #ifndef CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_ |
| 6 #define CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_ | 6 #define CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 #include <Security/Authorization.h> | 9 #include <Security/Authorization.h> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 extern NSString* KSRegistrationCheckForUpdateNotification; | 42 extern NSString* KSRegistrationCheckForUpdateNotification; |
| 43 extern NSString* KSRegistrationStatusKey; | 43 extern NSString* KSRegistrationStatusKey; |
| 44 extern NSString* KSRegistrationUpdateCheckErrorKey; | 44 extern NSString* KSRegistrationUpdateCheckErrorKey; |
| 45 | 45 |
| 46 extern NSString* KSRegistrationStartUpdateNotification; | 46 extern NSString* KSRegistrationStartUpdateNotification; |
| 47 extern NSString* KSUpdateCheckSuccessfulKey; | 47 extern NSString* KSUpdateCheckSuccessfulKey; |
| 48 extern NSString* KSUpdateCheckSuccessfullyInstalledKey; | 48 extern NSString* KSUpdateCheckSuccessfullyInstalledKey; |
| 49 | 49 |
| 50 extern NSString* KSRegistrationRemoveExistingTag; | 50 extern NSString* KSRegistrationRemoveExistingTag; |
| 51 | |
| 52 extern NSString* KSReportingAttributeValueKey; | |
| 53 extern NSString* KSReportingAttributeExpirationDateKey; | |
| 54 extern NSString* KSReportingAttributeAggregationTypeKey; | |
| 55 #define KSRegistrationPreserveExistingTag nil | 51 #define KSRegistrationPreserveExistingTag nil |
| 56 | 52 |
| 57 } // namespace keystone_registration | 53 } // namespace keystone_registration |
| 58 | 54 |
| 59 typedef enum { | |
| 60 kKSReportingAggregationSum = 0, // Adds attribute value across user accounts | |
| 61 kKSReportingAggregationDefault = kKSReportingAggregationSum, | |
| 62 } KSReportingAggregationType; | |
| 63 | |
| 64 @interface KSRegistration : NSObject | 55 @interface KSRegistration : NSObject |
| 65 | 56 |
| 66 + (id)registrationWithProductID:(NSString*)productID; | 57 + (id)registrationWithProductID:(NSString*)productID; |
| 67 | 58 |
| 68 - (BOOL)registerWithParameters:(NSDictionary*)args; | 59 - (BOOL)registerWithParameters:(NSDictionary*)args; |
| 69 | 60 |
| 70 - (BOOL)promoteWithParameters:(NSDictionary*)args | 61 - (BOOL)promoteWithParameters:(NSDictionary*)args |
| 71 authorization:(AuthorizationRef)authorization; | 62 authorization:(AuthorizationRef)authorization; |
| 72 | 63 |
| 73 - (BOOL)setActive; | 64 - (BOOL)setActive; |
| 74 - (BOOL)setActiveWithReportingAttributes:(NSArray*)reportingAttributes | |
| 75 error:(NSError**)error; | |
| 76 - (void)checkForUpdateWasUserInitiated:(BOOL)userInitiated; | 65 - (void)checkForUpdateWasUserInitiated:(BOOL)userInitiated; |
| 77 - (void)startUpdate; | 66 - (void)startUpdate; |
| 78 - (keystone_registration::KSRegistrationTicketType)ticketType; | 67 - (keystone_registration::KSRegistrationTicketType)ticketType; |
| 79 | 68 |
| 80 @end // @interface KSRegistration | 69 @end // @interface KSRegistration |
| 81 | 70 |
| 82 | |
| 83 // Declarations of the Keystone attribute reporting bits needed here. | |
| 84 // Full definition is at: | |
| 85 // //depot/googlemac/opensource/update-engine/Common/KSReportingAttribute.h | |
| 86 @interface KSReportingAttribute : NSObject | |
| 87 | |
| 88 @end // @interface KSReportingAttribute | |
| 89 | |
| 90 @interface KSUnsignedReportingAttribute : KSReportingAttribute | |
| 91 | |
| 92 + (KSUnsignedReportingAttribute *)reportingAttributeWithValue:(uint32_t)value | |
| 93 name:(NSString *)name | |
| 94 aggregationType:(KSReportingAggregationType)aggregationType | |
| 95 error:(NSError **)error; | |
| 96 | |
| 97 @end // @interface KSUnsignedReportingAttribute | |
| 98 | |
| 99 | |
| 100 #endif // CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_ | 71 #endif // CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_ |
| OLD | NEW |