forked from mykeepass/KeePassLib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kdb.h
80 lines (60 loc) · 2.02 KB
/
Kdb.h
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//
// KDB.h
// KeePass2
//
// Created by Qiang Yu on 1/1/10.
// Copyright 2010 Qiang Yu. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol KdbEntry;
@protocol KdbGroup<NSObject>
-(id<KdbGroup>)getParent;
-(void)setParent:(id<KdbGroup>)parent;
-(NSString*)getGroupName;
-(void)setGroupName:(NSString *)groupName;
-(NSArray *)getEntries;
-(void)addEntry:(id<KdbEntry>)child;
-(void)deleteEntry:(id<KdbEntry>)child;
-(NSArray *)getSubGroups;
-(void)addSubGroup:(id<KdbGroup>)child;
-(void)deleteSubGroup:(id<KdbGroup>)child;
-(void)setCreation:(NSDate *) date;
-(void)setLastMod:(NSDate *) date;
-(void)setLastAccess:(NSDate *) date;
-(void)setExpiry:(NSDate *) date;
@end
@protocol KdbEntry<NSObject>
-(id<KdbGroup>)getParent;
-(void)setParent:(id<KdbGroup>)parent;
-(NSString*)getEntryName;
-(void)setEntryName:(NSString *)entryName;
-(NSString*)getUserName;
-(void)setUserName:(NSString *)userName;
-(NSString*)getPassword;
-(void)setPassword:(NSString *)password;
-(NSString*)getURL;
-(void)setURL:(NSString *)url;
-(NSString*)getComments;
-(void)setComments:(NSString *)comments;
-(NSUInteger)getNumberOfCustomAttributes;
-(NSString *)getCustomAttributeName:(NSUInteger) index;
-(NSString *)getCustomAttributeValue:(NSUInteger) index;
-(void)setCreation:(NSDate *) date;
-(void)setLastMod:(NSDate *) date;
-(void)setLastAccess:(NSDate *) date;
-(void)setExpiry:(NSDate *) date;
/* TODO:
-(NSDate*)getCreationDate;
-(NSDate*)getLastAccessDate;
-(NSDate*)getModificationDate;
-(NSDate*)getExpiry;
-(void)setCreationDateYear:(int)yyyy month:(int)mm day:(int)dd hour:(int)hh minutes:(int)mi seconds:(int)ss;
-(void)setLastAccessDate:(int)yyyy month:(int)mm day:(int)dd hour:(int)hh minutes:(int)mi seconds:(int)ss;
-(void)setModificationDate:(int)yyyy month:(int)mm day:(int)dd hour:(int)hh minutes:(int)mi seconds:(int)ss;
-(void)setExpiry:(int)yyyy month:(int)mm day:(int)dd hour:(int)hh minutes:(int)mi seconds:(int)ss;
*/
@end
@protocol KdbTree<NSObject>
-(id<KdbGroup>)getRoot;
-(BOOL)isRecycleBin:(id<KdbGroup>)group;
@end