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         public abstract class ObjectSecurity {
36                 protected ObjectSecurity ()
37                 {
38                         /* Give it a 0-param constructor */
39                 }
40                 
41                 protected ObjectSecurity (bool isContainer, bool isDS)
42                 {
43                 }
44
45                 public abstract Type AccessRightType
46                 {
47                         get;
48                 }
49                 
50                 public abstract Type AccessRuleType
51                 {
52                         get;
53                 }
54                 
55                 public bool AreAccessRulesCanonical
56                 {
57                         get {
58                                 throw new NotImplementedException ();
59                         }
60                 }
61                 
62                 public bool AreAccessRulesProtected
63                 {
64                         get {
65                                 throw new NotImplementedException ();
66                         }
67                 }
68                 
69                 public bool AreAuditRulesCanonical
70                 {
71                         get {
72                                 throw new NotImplementedException ();
73                         }
74                 }
75                 
76                 public bool AreAuditRulesProtected
77                 {
78                         get {
79                                 throw new NotImplementedException ();
80                         }
81                 }
82                 
83                 public abstract Type AuditRuleType
84                 {
85                         get;
86                 }
87                 
88                 protected bool AccessRulesModified
89                 {
90                         get {
91                                 throw new NotImplementedException ();
92                         }
93                         set {
94                                 throw new NotImplementedException ();
95                         }
96                 }
97                 
98                 protected bool AuditRulesModified
99                 {
100                         get {
101                                 throw new NotImplementedException ();
102                         }
103                         set {
104                                 throw new NotImplementedException ();
105                         }
106                 }
107                 
108                 protected bool GroupModified
109                 {
110                         get {
111                                 throw new NotImplementedException ();
112                         }
113                         set {
114                                 throw new NotImplementedException ();
115                         }
116                 }
117                 
118                 protected bool IsContainer
119                 {
120                         get {
121                                 throw new NotImplementedException ();
122                         }
123                 }
124                 
125                 protected bool IsDS
126                 {
127                         get {
128                                 throw new NotImplementedException ();
129                         }
130                 }
131                 
132                 protected bool OwnerModified
133                 {
134                         get {
135                                 throw new NotImplementedException ();
136                         }
137                         set {
138                                 throw new NotImplementedException ();
139                         }
140                 }
141         
142                 public abstract AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type);
143                 
144                 public abstract AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags);
145                 
146                 public IdentityReference GetGroup (Type targetType)
147                 {
148                         throw new NotImplementedException ();
149                 }
150                 
151                 public IdentityReference GetOwner (Type targetType)
152                 {
153                         throw new NotImplementedException ();
154                 }
155                 
156                 public byte[] GetSecurityDescriptorBinaryForm ()
157                 {
158                         throw new NotImplementedException ();
159                 }
160                 
161                 public string GetSecurityDescriptorSddlForm (AccessControlSections includeSections)
162                 {
163                         throw new NotImplementedException ();
164                 }
165                 
166                 public static bool IsSddlConversionSupported ()
167                 {
168                         throw new NotImplementedException ();
169                 }
170                 
171                 public virtual bool ModifyAccessRule (AccessControlModification modification, AccessRule rule, out bool modified)
172                 {
173                         throw new NotImplementedException ();
174                 }
175                 
176                 public virtual bool ModifyAuditRule (AccessControlModification modification, AuditRule rule, out bool modified)
177                 {
178                         throw new NotImplementedException ();
179                 }
180                 
181                 public virtual void PurgeAccessRules (IdentityReference identity)
182                 {
183                         throw new NotImplementedException ();
184                 }
185                 
186                 public virtual void PurgeAuditRules (IdentityReference identity)
187                 {
188                         throw new NotImplementedException ();
189                 }
190                 
191                 public void SetAccessRuleProtection (bool isProtected,
192                                                      bool preserveInheritance)
193                 {
194                         throw new NotImplementedException ();
195                 }
196                 
197                 public void SetAuditRuleProtection (bool isProtected,
198                                                     bool preserveInheritance)
199                 {
200                         throw new NotImplementedException ();
201                 }
202                 
203                 public void SetGroup (IdentityReference identity)
204                 {
205                         throw new NotImplementedException ();
206                 }
207                 
208                 public void SetOwner (IdentityReference identity)
209                 {
210                         throw new NotImplementedException ();
211                 }
212                 
213                 public void SetSecurityDescriptorBinaryForm (byte[] binaryForm)
214                 {
215                         throw new NotImplementedException ();
216                 }
217                 
218                 public void SetSecurityDescriptorBinaryForm (byte[] binaryForm, AccessControlSections includeSections)
219                 {
220                         throw new NotImplementedException ();
221                 }
222                 
223                 public void SetSecurityDescriptorSddlForm (string sddlForm)
224                 {
225                         throw new NotImplementedException ();
226                 }
227
228                 public void SetSecurityDescriptorSddlForm (string sddlForm, AccessControlSections includeSections)
229                 {
230                         throw new NotImplementedException ();
231                 }
232                 
233                 protected abstract bool ModifyAccess (AccessControlModification modification, AccessRule rule, out bool modified);
234                 
235                 protected abstract bool ModifyAudit (AccessControlModification modification, AuditRule rule, out bool modified);
236                 
237                 protected virtual void Persist (SafeHandle handle, AccessControlSections includeSections)
238                 {
239                         throw new NotImplementedException ();
240                 }
241                 
242                 protected virtual void Persist (string name, AccessControlSections includeSections)
243                 {
244                         throw new NotImplementedException ();
245                 }
246
247                 protected virtual void Persist (bool enableOwnershipPrivilege, string name, AccessControlSections includeSections)
248                 {
249                         throw new NotImplementedException ();
250                 }
251                 
252                 protected void ReadLock ()
253                 {
254                         throw new NotImplementedException ();
255                 }
256                 
257                 protected void ReadUnlock ()
258                 {
259                         throw new NotImplementedException ();
260                 }
261                 
262                 protected void WriteLock ()
263                 {
264                         throw new NotImplementedException ();
265                 }
266                 
267                 protected void WriteUnlock ()
268                 {
269                         throw new NotImplementedException ();
270                 }
271         }
272 }
273
274 #endif