New test.
[mono.git] / mcs / class / corlib / System.Security.AccessControl / ObjectSecurity.cs
1 //
2 // System.Security.AccessControl.ObjectSecurity implementation
3 //
4 // Author:
5 //      Dick Porter  <dick@ximian.com>
6 //
7 // Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
8 //
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
16 // 
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
19 // 
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28
29 #if NET_2_0
30
31 using System.Security.Principal;
32 using System.Runtime.InteropServices;
33
34 namespace System.Security.AccessControl {
35
36         public abstract class ObjectSecurity {
37
38                 internal ObjectSecurity ()
39                 {
40                         /* Give it a 0-param constructor */
41                 }
42                 
43                 protected ObjectSecurity (bool isContainer, bool isDS)
44                 {
45                 }
46
47                 public abstract Type AccessRightType
48                 {
49                         get;
50                 }
51                 
52                 public abstract Type AccessRuleType
53                 {
54                         get;
55                 }
56                 
57                 public bool AreAccessRulesCanonical
58                 {
59                         get {
60                                 throw new NotImplementedException ();
61                         }
62                 }
63                 
64                 public bool AreAccessRulesProtected
65                 {
66                         get {
67                                 throw new NotImplementedException ();
68                         }
69                 }
70                 
71                 public bool AreAuditRulesCanonical
72                 {
73                         get {
74                                 throw new NotImplementedException ();
75                         }
76                 }
77                 
78                 public bool AreAuditRulesProtected
79                 {
80                         get {
81                                 throw new NotImplementedException ();
82                         }
83                 }
84                 
85                 public abstract Type AuditRuleType
86                 {
87                         get;
88                 }
89                 
90                 protected bool AccessRulesModified
91                 {
92                         get {
93                                 throw new NotImplementedException ();
94                         }
95                         set {
96                                 throw new NotImplementedException ();
97                         }
98                 }
99                 
100                 protected bool AuditRulesModified
101                 {
102                         get {
103                                 throw new NotImplementedException ();
104                         }
105                         set {
106                                 throw new NotImplementedException ();
107                         }
108                 }
109                 
110                 protected bool GroupModified
111                 {
112                         get {
113                                 throw new NotImplementedException ();
114                         }
115                         set {
116                                 throw new NotImplementedException ();
117                         }
118                 }
119                 
120                 protected bool IsContainer
121                 {
122                         get {
123                                 throw new NotImplementedException ();
124                         }
125                 }
126                 
127                 protected bool IsDS
128                 {
129                         get {
130                                 throw new NotImplementedException ();
131                         }
132                 }
133                 
134                 protected bool OwnerModified
135                 {
136                         get {
137                                 throw new NotImplementedException ();
138                         }
139                         set {
140                                 throw new NotImplementedException ();
141                         }
142                 }
143         
144                 public abstract AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type);
145                 
146                 public abstract AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags);
147                 
148                 public IdentityReference GetGroup (Type targetType)
149                 {
150                         throw new NotImplementedException ();
151                 }
152                 
153                 public IdentityReference GetOwner (Type targetType)
154                 {
155                         throw new NotImplementedException ();
156                 }
157                 
158                 public byte[] GetSecurityDescriptorBinaryForm ()
159                 {
160                         throw new NotImplementedException ();
161                 }
162                 
163                 public string GetSecurityDescriptorSddlForm (AccessControlSections includeSections)
164                 {
165                         throw new NotImplementedException ();
166                 }
167                 
168                 public static bool IsSddlConversionSupported ()
169                 {
170                         throw new NotImplementedException ();
171                 }
172                 
173                 public virtual bool ModifyAccessRule (AccessControlModification modification, AccessRule rule, out bool modified)
174                 {
175                         throw new NotImplementedException ();
176                 }
177                 
178                 public virtual bool ModifyAuditRule (AccessControlModification modification, AuditRule rule, out bool modified)
179                 {
180                         throw new NotImplementedException ();
181                 }
182                 
183                 public virtual void PurgeAccessRules (IdentityReference identity)
184                 {
185                         throw new NotImplementedException ();
186                 }
187                 
188                 public virtual void PurgeAuditRules (IdentityReference identity)
189                 {
190                         throw new NotImplementedException ();
191                 }
192                 
193                 public void SetAccessRuleProtection (bool isProtected,
194                                                      bool preserveInheritance)
195                 {
196                         throw new NotImplementedException ();
197                 }
198                 
199                 public void SetAuditRuleProtection (bool isProtected,
200                                                     bool preserveInheritance)
201                 {
202                         throw new NotImplementedException ();
203                 }
204                 
205                 public void SetGroup (IdentityReference identity)
206                 {
207                         throw new NotImplementedException ();
208                 }
209                 
210                 public void SetOwner (IdentityReference identity)
211                 {
212                         throw new NotImplementedException ();
213                 }
214                 
215                 public void SetSecurityDescriptorBinaryForm (byte[] binaryForm)
216                 {
217                         throw new NotImplementedException ();
218                 }
219                 
220                 public void SetSecurityDescriptorBinaryForm (byte[] binaryForm, AccessControlSections includeSections)
221                 {
222                         throw new NotImplementedException ();
223                 }
224                 
225                 public void SetSecurityDescriptorSddlForm (string sddlForm)
226                 {
227                         throw new NotImplementedException ();
228                 }
229
230                 public void SetSecurityDescriptorSddlForm (string sddlForm, AccessControlSections includeSections)
231                 {
232                         throw new NotImplementedException ();
233                 }
234                 
235                 protected abstract bool ModifyAccess (AccessControlModification modification, AccessRule rule, out bool modified);
236                 
237                 protected abstract bool ModifyAudit (AccessControlModification modification, AuditRule rule, out bool modified);
238                 
239                 protected virtual void Persist (SafeHandle handle, AccessControlSections includeSections)
240                 {
241                         throw new NotImplementedException ();
242                 }
243                 
244                 protected virtual void Persist (string name, AccessControlSections includeSections)
245                 {
246                         throw new NotImplementedException ();
247                 }
248
249                 protected virtual void Persist (bool enableOwnershipPrivilege, string name, AccessControlSections includeSections)
250                 {
251                         throw new NotImplementedException ();
252                 }
253                 
254                 protected void ReadLock ()
255                 {
256                         throw new NotImplementedException ();
257                 }
258                 
259                 protected void ReadUnlock ()
260                 {
261                         throw new NotImplementedException ();
262                 }
263                 
264                 protected void WriteLock ()
265                 {
266                         throw new NotImplementedException ();
267                 }
268                 
269                 protected void WriteUnlock ()
270                 {
271                         throw new NotImplementedException ();
272                 }
273         }
274 }
275
276 #endif