// Copyright 1997-1999 Omni Development, Inc.  All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
// distributed with this project and can also be found at
// http://www.omnigroup.com/DeveloperResources/OmniSourceLicense.html.
//
// $Header: /Network/Developer/Source/CVS/OmniGroup/OmniFoundation/OFUserDefaults.h,v 1.9 1999/03/30 21:25:33 kc Exp $

#import "OFObject.h"

@class NSMutableArray, NSArray, NSData;

@interface OFUserDefaults : OFObject
{
    NSString *ownerName;
    NSMutableArray      *unresolvedKeys;
    NSMutableDictionary *defaultsDictionary;
    NSMutableDictionary *globalDefaultsDictionary;
    NSMutableDictionary *registrationDictionary;
    NSMutableDictionary *overrideNetworkDictionary;
    NSMutableDictionary *advisoryNetworkDictionary;
    unsigned int changeCount;
}

+ (OFUserDefaults *)sharedUserDefaults;

- (void)setOwnerName:(NSString *)ownerName;
- (NSString *)ownerName;

- (void)readDefaultsDatabase;

- (NSDictionary *)defaultsDictionary;
- (NSDictionary *)registrationDictionary;
- (NSDictionary *)overrideNetworkDictionary;
- (NSDictionary *)advisoryNetworkDictionary;
- (unsigned int)changeCount;

- (BOOL)defaultRegisteredForKey:(NSString *)defaultName;
- (id)objectForKey:(NSString *)defaultName;

- (NSArray *)arrayForKey:(NSString *)defaultName;
- (BOOL)boolForKey:(NSString *)defaultName;
- (NSData *)dataForKey:(NSString *)defaultName;
- (NSDictionary *)dictionaryForKey:(NSString *)defaultName;
- (float)floatForKey:(NSString *)defaultName;
- (int)integerForKey:(NSString *)defaultName;
- (NSArray *)stringArrayForKey:(NSString *)defaultName;
- (NSString *)stringForKey:(NSString *)defaultName;

- (void)removeObjectForKey:(NSString *)defaultName;

- (void)setObject:(id)value forKey:(NSString *)defaultName;

- (void)setBool:(BOOL)value forKey:(NSString *)defaultName;
- (void)setFloat:(float)value forKey:(NSString *)defaultName;
- (void)setInteger:(int)value forKey:(NSString *)defaultName;

- (void)registerDefaults:(NSDictionary *)dictionary;	

@end

#import "FrameworkDefines.h"

OmniFoundation_EXTERN NSString *OFUserDefaultsNotRegisteredException;
