Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / platform / DARWIN / AFSPreference / DBCellElement.h
1 //
2 // DBCellElement.h
3 // AFSCommander
4 //
5 // Created by Claudio Bisegni on 14/06/07.
6 // Copyright 2007 INFN - National Institute of Nuclear Physics. All rights reserved.
7 //
8 // Is the identification of a cell in he afs cell database
9
10 #import <Cocoa/Cocoa.h>
11 #import "CellIp.h"
12
13 @interface DBCellElement : NSObject {
14 BOOL userDefaultForToken;
15 BOOL userDefaultCell;
16 NSString *cellName;
17 NSString *cellComment;
18 NSMutableArray *ipCellList;
19 }
20
21 /*!
22 @method init
23 @abstract
24 @discussion
25 */
26 -(id) init;
27
28 /*!
29 @method dealloc
30 @abstract
31 @discussion
32 */
33 -(void) dealloc;
34
35 /*!
36 @method setCellName
37 @abstract Set the cel name
38 @discussion Release the old cell name andretain the new one
39 @param name - Name of the cell
40 */
41 -(void) setCellName:(NSString *)name;
42
43 /*!
44 @method getCellName
45 @abstract Return the cell name
46 @discussion Return the cell name
47 @result Name of the cell
48 */
49 -(NSString*) getCellName;
50
51 /*!
52 @method setCellComment
53 @abstract Set the comment of the cell
54 @discussion Release the old cell comment and retain the new one
55 @param comment - Comment of the cell
56 */
57 -(void) setCellComment:(NSString *)comment;
58
59 /*!
60 @method getCellComment
61 @abstract Get the comment of the cell
62 @discussion Get the comment of the cell
63 @result comment of the cell
64
65 */
66 -(NSString*) getCellComment;
67
68 /*!
69 @method setUserDefaultForToken
70 @abstract Set the userde fault for tokens for the cell
71 @discussion If this cell is a cell used by user this flag will be true,
72 for multi cell authentication will be more cell with this flag on true.
73 @param isDefault - true if the this cell is default which the user want to ge token for
74
75 */
76 -(void) setUserDefaultForToken:(BOOL)isDefault;
77
78 /*!
79 @method userDefault
80 @abstract Return the user request for token flag
81 @discussion
82 @result if true this cell is used to get the tokens
83 */
84 -(BOOL) userDefaultForToken;
85 /*!
86 @method setUserDefaultCell
87 @abstract set the user default cell state
88 @discussion
89 @result set this cell as default user cell
90 */
91 -(void) setUserDefaultCell:(BOOL)isDefault;
92 /*!
93 @method userDefaultForCell
94 @abstract Return the user default cell state
95 @discussion
96 @result is true if this cell is the default cell
97 */
98 -(BOOL) userDefaultForCell;
99 /*!
100 @method addIpToCell
101 @abstract Add an ipcell description to this cell
102 @discussion Add a new IpCell class to this cell to specify the server ip
103 @param ip - CellIP class representing the ip of one server of the cell
104 */
105 -(void) addIpToCell:(CellIp*)ip;
106
107 /*!
108 @method getIp
109 @abstract Return the array containing all ip for thi cell
110 @discussion
111 @result The array containing all the cell ip decription class
112 */
113 -(NSMutableArray*) getIp;
114
115 /*!
116 @method description
117 @abstract Return the description of this cell
118 @discussion The description is the same stile used in CellServDB file(for a single cell)
119 so calling thi method for all cell will be reconstructed the entire afs configuration file for CellSerDB
120 @result The string description of the cell with all the ip
121 */
122 -(NSString*) description;
123
124 /*!
125 @method isEqual
126 @abstract Compare this object with anoter of the same type
127 @discussion Compare this object with the ine passed to the function
128 @param anObject - An object to compare with this.
129 @result true if the two object are the same.
130 */
131 - (BOOL)isEqual:(id)anObject;
132
133 - (BOOL)isEqualToString:(NSString *)aString;
134 @end