-
Notifications
You must be signed in to change notification settings - Fork 1
/
DUUser.h
71 lines (57 loc) · 1.5 KB
/
DUUser.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
//
// DUUser.h
// DNSUpdate2
//
// Created by jalon on Sun Apr 01 2001.
// Copyright (c) 2001-2003 Julien Jalon. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "DUProtocols.h"
@class DUHost;
@class DUServiceUpdater;
extern NSString *DUUserOk;
extern NSString *DUUserBadAuth;
#define MAX_TRIES 3
@class DUServiceUpdater;
@interface DUUser : NSObject <DUIdentify> {
BOOL active;
NSString *name;
NSString *password;
DUServiceUpdater *service;
NSString *userStatus;
NSMutableArray *hosts;
BOOL dirty;
BOOL isUpdating;
unsigned char tries;
}
+ (NSDictionary *)users;
+ (DUUser *)addUserWithName:(NSString *)theName andPassword:(NSString *)thePassword andService:(DUServiceUpdater *)theService;
- (void)setName:(NSString *)theName;
- (NSString *)getName;
- (void)setPassword:(NSString *)thePassword;
- (NSString *)getPassword;
- (void)setActive:(BOOL)flag;
- (BOOL)isActive;
- (NSString *)getUserStatus;
- (void)setUserStatus:(NSString *)theStatus;
- (DUServiceUpdater *)getService;
- (void)setService:(DUServiceUpdater *)theService;
- (void)addHost:(DUHost *)theHost;
- (void)removeHost:(DUHost *)theHost;
- (NSArray *)hosts;
//- (DUHost *)hostWithName:(NSString *)theName;
- (BOOL)isDirty;
- (void)setDirty:(BOOL)flag;
- (BOOL)isUpdating;
- (void)setUpdating:(BOOL)flag;
- (unsigned char)tries;
- (void)addATry;
- (void)resetTries;
- (void)update;
+ (void)update;
+ (void)updating;
- (void)saveUser;
+ (void)saveUsers;
+ (void)loadUsers;
- (void)removeUser;
@end