// // MPT_Demo.h // AUCoderDemo // // Created by Andrew Salamon on 10/5/07. // Copyright 2007 Machine Perception Laboratory, University of California San Diego.. All rights reserved. // #import typedef enum { lic_invalid, lic_internal, lic_evaluation, lic_licensed } LicenseType; @interface MPT_Demo : NSObject { void *imp; void *license; } + (MPT_Demo *)sharedDemo; - (LicenseType)type; - (BOOL)isEvaluation; - (BOOL)isLicensed; - (BOOL)isInternal; - (BOOL)isDemo; ///< Returns yes if we have a startDate or can read one from a file. - (BOOL)hasDemoEnded; - (BOOL)startDemo; ///< Write the current date to a file to start counting the demo period. Returns NO if we can't write the file. - (void)notifyUserDemoEnded; - (void)notifyUserDemoNotAllowed; - (void)notifyUserDemoLeft; // New licensing related methods - (BOOL)licenseHasEnded; - (void)notifyUserInvalidLicense; - (void)notifyUserLicenseEnded; - (void)notifyUserLicenseInfo; - (NSString *)filename; - (void)setFilename:(NSString *)value; - (NSArray *)allowedPaths; - (void)setAllowedPaths:(NSArray *)value; - (unsigned int)demoLength; ///< In days. - (void)setDemoLength:(unsigned int)days; - (NSCalendarDate *)demoStartDate; @end