Home | History | Annotate | Download | only in mac
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_
      6 #define CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_
      7 
      8 #import <Foundation/Foundation.h>
      9 #include <Security/Authorization.h>
     10 
     11 // Declarations of the Keystone registration bits needed here. From
     12 // KSRegistration.h.
     13 
     14 namespace keystone_registration {
     15 
     16 typedef enum {
     17   kKSPathExistenceChecker,
     18 } KSExistenceCheckerType;
     19 
     20 typedef enum {
     21   kKSRegistrationUserTicket,
     22   kKSRegistrationSystemTicket,
     23   kKSRegistrationDontKnowWhatKindOfTicket,
     24 } KSRegistrationTicketType;
     25 
     26 extern NSString* KSRegistrationVersionKey;
     27 extern NSString* KSRegistrationExistenceCheckerTypeKey;
     28 extern NSString* KSRegistrationExistenceCheckerStringKey;
     29 extern NSString* KSRegistrationServerURLStringKey;
     30 extern NSString* KSRegistrationPreserveTrustedTesterTokenKey;
     31 extern NSString* KSRegistrationTagKey;
     32 extern NSString* KSRegistrationTagPathKey;
     33 extern NSString* KSRegistrationTagKeyKey;
     34 extern NSString* KSRegistrationBrandPathKey;
     35 extern NSString* KSRegistrationBrandKeyKey;
     36 extern NSString* KSRegistrationVersionPathKey;
     37 extern NSString* KSRegistrationVersionKeyKey;
     38 
     39 extern NSString* KSRegistrationDidCompleteNotification;
     40 extern NSString* KSRegistrationPromotionDidCompleteNotification;
     41 
     42 extern NSString* KSRegistrationCheckForUpdateNotification;
     43 extern NSString* KSRegistrationStatusKey;
     44 extern NSString* KSRegistrationUpdateCheckErrorKey;
     45 
     46 extern NSString* KSRegistrationStartUpdateNotification;
     47 extern NSString* KSUpdateCheckSuccessfulKey;
     48 extern NSString* KSUpdateCheckSuccessfullyInstalledKey;
     49 
     50 extern NSString* KSRegistrationRemoveExistingTag;
     51 #define KSRegistrationPreserveExistingTag nil
     52 
     53 }  // namespace keystone_registration
     54 
     55 @interface KSRegistration : NSObject
     56 
     57 + (id)registrationWithProductID:(NSString*)productID;
     58 
     59 - (BOOL)registerWithParameters:(NSDictionary*)args;
     60 
     61 - (BOOL)promoteWithParameters:(NSDictionary*)args
     62                 authorization:(AuthorizationRef)authorization;
     63 
     64 - (void)setActive;
     65 - (void)checkForUpdate;
     66 - (void)startUpdate;
     67 - (keystone_registration::KSRegistrationTicketType)ticketType;
     68 
     69 @end  // @interface KSRegistration
     70 
     71 #endif  // CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_
     72