root/Trunk/Adium.framework/Versions/A/Headers/ESObjectWithProperties.h @ 2

Revision 2, 2.9 KB (checked in by jon, 16 years ago)

Initial commit of skeletal project.

Line 
1/*
2 * Adium is the legal property of its developers, whose names are listed in the copyright file included
3 * with this source distribution.
4 *
5 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
6 * General Public License as published by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
10 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
11 * Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along with this program; if not,
14 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
15 */
16
17
18@class AIMutableOwnerArray;
19
20typedef enum {
21        NotifyNever = -9999,
22        NotifyLater = NO,   /* 0 */
23        NotifyNow = YES         /* 1 */
24} NotifyTiming;
25       
26@interface ESObjectWithProperties : NSObject {
27    NSMutableDictionary         *propertiesDictionary;
28    NSMutableSet                        *changedProperties;             //Properties that have changed since the last notification
29       
30        NSMutableDictionary             *displayDictionary;             //A dictionary of values affecting this object's display
31}
32
33//Setting properties
34- (void)setValue:(id)value forProperty:(NSString *)key notify:(NotifyTiming)notify;
35- (void)setValue:(id)value forProperty:(NSString *)key afterDelay:(NSTimeInterval)delay;
36- (void)notifyOfChangedPropertiesSilently:(BOOL)silent;
37
38//Getting properties
39- (NSEnumerator *)propertyEnumerator;
40- (id)valueForProperty:(NSString *)key;
41- (int)integerValueForProperty:(NSString *)key;
42- (NSNumber *)numberValueForProperty:(NSString *)key;
43- (NSString *)stringFromAttributedStringValueForProperty:(NSString *)key;
44
45- (id)valueForProperty:(NSString *)key fromAnyContainedObject:(BOOL)fromAnyContainedObject;
46- (int)integerValueForProperty:(NSString *)key fromAnyContainedObject:(BOOL)fromAnyContainedObject;
47- (NSNumber *)numberValueForProperty:(NSString *)key fromAnyContainedObject:(BOOL)fromAnyContainedObject;
48- (NSString *)stringFromAttributedStringValueForProperty:(NSString *)key fromAnyContainedObject:(BOOL)fromAnyContainedObject;
49
50//Properties: Specifically for subclasses
51- (void)object:(id)inObject didChangeValueForProperty:(NSString *)key notify:(NotifyTiming)notify;
52- (void)didModifyProperties:(NSSet *)keys silent:(BOOL)silent;
53- (void)didNotifyOfChangedPropertiesSilently:(BOOL)silent;
54
55//Display array
56- (AIMutableOwnerArray *)displayArrayForKey:(NSString *)inKey;
57- (AIMutableOwnerArray *)displayArrayForKey:(NSString *)inKey create:(BOOL)create;
58- (id)displayArrayObjectForKey:(NSString *)inKey;
59
60//Name
61- (NSString *)displayName;
62
63//Mutable owner array delegate method
64- (void)mutableOwnerArray:(AIMutableOwnerArray *)inArray didSetObject:(id)anObject withOwner:(id)inOwner priorityLevel:(float)priority;
65
66@end
Note: See TracBrowser for help on using the browser.