File: MemoryStore.h

package info (click to toggle)
agenda.app 0.44-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,012 kB
  • sloc: objc: 7,820; makefile: 18
file content (59 lines) | stat: -rw-r--r-- 1,610 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* emacs buffer mode hint -*- objc -*- */

#import <Foundation/Foundation.h>
#import "ConfigManager.h"

extern NSString * const SADataChangedInStore;
extern NSString * const SAStatusChangedForStore;
extern NSString * const SAEnabledStatusChangedForStore;
extern NSString * const SAElementAddedToStore;
extern NSString * const SAElementRemovedFromStore;
extern NSString * const SAElementUpdatedInStore;
extern NSString * const SAErrorReadingStore;
extern NSString * const SAErrorWritingStore;

@class Element;
@class NSColor;

@protocol MemoryStore <NSObject>
+ (BOOL)registerWithName:(NSString *)name;
+ (id)storeNamed:(NSString *)name;
+ (BOOL)isUserInstanciable;
+ (NSString *)storeName;
+ (NSString *)storeTypeName;
- (id)initWithName:(NSString *)name;
- (ConfigManager *)config;
- (NSArray *)events;
- (NSArray *)tasks;
- (Element *)elementWithUID:(NSString *)uid;
- (void)fillWithElements:(NSSet *)set;
- (void)add:(Element *)evt;
- (void)remove:(Element *)elt;
- (void)update:(Element *)evt;
- (BOOL)contains:(Element *)elt;
- (BOOL)modified;
- (void)setModified:(BOOL)modified;
- (BOOL)writable;
- (void)setWritable:(BOOL)writable;
- (NSColor *)eventColor;
- (void)setEventColor:(NSColor *)color;
- (NSColor *)textColor;
- (void)setTextColor:(NSColor *)color;
- (BOOL)displayed;
- (void)setDisplayed:(BOOL)state;
- (BOOL)enabled;
- (void)setEnabled:(BOOL)state;
@end

@interface MemoryStore : NSObject <MemoryStore>
{
  ConfigManager *_config;
  NSMutableDictionary *_data;
  NSMutableDictionary *_tasks;
  BOOL _modified;
  NSString *_name;
  BOOL _displayed;
  BOOL _writable;
  BOOL _enabled;
}
@end