// // 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 @interface MPT_Demo : NSObject { NSString *filename; NSArray *allowedPaths; NSTimeInterval demoLength; NSDate *startDate; } + (MPT_Demo *)sharedDemo; - (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; - (NSString *)filename; - (void)setFilename:(NSString *)value; - (NSArray *)allowedPaths; - (void)setAllowedPaths:(NSArray *)value; - (unsigned int)demoLength; ///< In days. - (void)setDemoLength:(unsigned int)days; @end