//
//  PWFeatureDefaults.h
//  PWLicenseKit
//
//  Created by Andreas Känner on 26.10.08.
//  Copyright 2008 ProjectWizards. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "PWFeature.h"
#import "PWLicenseKit-Obfuscating.h"

extern NSString*  const PWFeatureDefaultsUserDefaultsKey;

@class PWFeatureDefault;
@class PWFeatureDefaults;

@protocol PWFeatureDefaultsDelegate

- (void) featureDefaults:(PWFeatureDefaults*)defaults saveUsedCount:(int)usedCount forFeatureNamed:(NSString*)featureName product:(NSString*)product;
- (NSNumber*) featureDefaults:(PWFeatureDefaults*)defaults loadUsedCountForFeatureNamed:(NSString*)featureName product:(NSString*)product;

@end

@interface PWFeatureDefaults : NSObject 
{
	NSObject <PWFeatureDefaultsDelegate>	*delegate;
	NSMutableDictionary						*defaults;
}

+ (PWFeatureDefaults*) sharedFeatureDefaults;

- (void) setDelegate:(NSObject <PWFeatureDefaultsDelegate>*) aDelegate;

- (void) setDefaultUsedCount:(int)defaultUsedCount 
				minUsedCount:(int)minUsedCount 
				maxUsedCount:(int)maxUsedCount 
	   usedCountQuantization:(int)usedCountQuantization 
			 forFeatureNamed:(NSString*)featureName 
					 product:(NSString*)product;			

- (void) setUsedCount:(int)usedCount forFeature:(PWFeature*)feature;
- (int) usedCountForFeature:(PWFeature*)feature;

- (int) defaultUsedCountForFeature:(PWFeature*)feature;
- (int) minUsedCountForFeature:(PWFeature*)feature;
- (int) maxUsedCountForFeature:(PWFeature*)feature;
- (int) usedCountQuantizationForFeature:(PWFeature*)feature;

@end


