00001
00002
00003 #import <Cocoa/Cocoa.h>
00004
00014 #define kGDRegistrationNameKey @"GDRegistrationNameKey"
00015
00019 #define kGDRegistrationLicenseKey @"GDRegistrationLicenseKey"
00020
00024 #define kGDRegistrationHasSentHome @"GDRegistrationHasSentHome"
00025
00029 #define kGDRegistrationHomeURLKey @"GDLicenseHomeURL"
00030
00034 @interface GDRegistration : NSObject {
00035
00036 NSString * homeURL;
00037
00041 NSUserDefaults * defaults;
00042
00046 NSMutableArray * blacklist;
00047 }
00048
00054 @property (copy) NSString * homeURL;
00055
00062 - (void) sendLicenseHome;
00063
00072 - (void) saveRegistrationIntoUserDefaults:(NSString *) nameStorageKey licenseStorageKey:(NSString *) licenseStorageKey name:(NSString *) name license:(NSString *) license;
00073
00080 - (void) saveRegistrationLicense:(NSString *) license forName:(NSString *) name;
00081
00087 - (NSString *) getLicense;
00088
00094 - (NSString *) getName;
00095
00102 - (Boolean) isValidForName:(NSString *) name andLicense:(NSString *) license;
00103
00109 - (Boolean) isValid;
00110
00114 - (Boolean) hasSavedRegistration;
00115
00121 - (Boolean) isLicenseBlacklisted:(NSString *) license;
00122
00127 - (Boolean) isRegisteredLicenseBlacklisted;
00128
00134 - (void) addLicenseToBlacklist:(NSString *) license;
00135
00136 @end