1 //
2 // System.Configuration.Internal.IInternalConfigHost.cs
3 //
4 // Authors:
5 //  Lluis Sanchez Gual (lluis@novell.com)
6 //
7 // Permission is hereby granted, free of charge, to any person obtaining
8 // a copy of this software and associated documentation files (the
9 // "Software"), to deal in the Software without restriction, including
10 // without limitation the rights to use, copy, modify, merge, publish,
11 // distribute, sublicense, and/or sell copies of the Software, and to
12 // permit persons to whom the Software is furnished to do so, subject to
13 // the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be
16 // included in all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 //
26 // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
27 //
28 
29 
30 using System;
31 using System.IO;
32 using System.Security;
33 
34 namespace System.Configuration.Internal
35 {
36 	[System.Runtime.InteropServices.ComVisible (false)]
37 	public interface IInternalConfigHost
38 	{
CreateConfigurationContext(string configPath, string locationSubPath)39 		object CreateConfigurationContext (string configPath, string locationSubPath);
CreateDeprecatedConfigContext(string configPath)40 		object CreateDeprecatedConfigContext (string configPath);
DecryptSection(string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection)41 		string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection);
DeleteStream(string streamName)42 		void DeleteStream (string streamName);
EncryptSection(string clearTextXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection)43 		string EncryptSection (string clearTextXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection);
GetConfigPathFromLocationSubPath(string configPath, string locationSubPath)44 		string GetConfigPathFromLocationSubPath (string configPath, string locationSubPath);
GetConfigType(string typeName, bool throwOnError)45 		Type GetConfigType (string typeName, bool throwOnError);
GetConfigTypeName(Type t)46 		string GetConfigTypeName (Type t);
GetRestrictedPermissions(IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady)47 		void GetRestrictedPermissions (IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady);
GetStreamName(string configPath)48 		string GetStreamName (string configPath);
GetStreamNameForConfigSource(string streamName, string configSource)49 		string GetStreamNameForConfigSource (string streamName, string configSource);
GetStreamVersion(string streamName)50 		object GetStreamVersion (string streamName);
Impersonate()51 		IDisposable Impersonate ();
Init(IInternalConfigRoot configRoot, params object[] hostInitParams)52 		void Init (IInternalConfigRoot configRoot, params object[] hostInitParams);
InitForConfiguration(ref string locationSubPath, out string configPath, out string locationConfigPath, IInternalConfigRoot configRoot, params object[] hostInitConfigurationParams)53 		void InitForConfiguration (ref string locationSubPath, out string configPath, out string locationConfigPath, IInternalConfigRoot configRoot, params object[] hostInitConfigurationParams);
IsAboveApplication(string configPath)54 		bool IsAboveApplication (string configPath);
IsConfigRecordRequired(string configPath)55 		bool IsConfigRecordRequired (string configPath);
IsDefinitionAllowed(string configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition)56 		bool IsDefinitionAllowed (string configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition);
IsFile(string streamName)57 		bool IsFile (string streamName);
IsFullTrustSectionWithoutAptcaAllowed(IInternalConfigRecord configRecord)58 		bool IsFullTrustSectionWithoutAptcaAllowed (IInternalConfigRecord configRecord);
IsInitDelayed(IInternalConfigRecord configRecord)59 		bool IsInitDelayed (IInternalConfigRecord configRecord);
IsLocationApplicable(string configPath)60 		bool IsLocationApplicable (string configPath);
61 		bool IsRemote { get; }
IsSecondaryRoot(string configPath)62 		bool IsSecondaryRoot (string configPath);
IsTrustedConfigPath(string configPath)63 		bool IsTrustedConfigPath (string configPath);
OpenStreamForRead(string streamName)64 		Stream OpenStreamForRead (string streamName);
OpenStreamForRead(string streamName, bool assertPermissions)65 		Stream OpenStreamForRead (string streamName, bool assertPermissions);
OpenStreamForWrite(string streamName, string templateStreamName, ref object writeContext)66 		Stream OpenStreamForWrite (string streamName, string templateStreamName, ref object writeContext);
OpenStreamForWrite(string streamName, string templateStreamName, ref object writeContext, bool assertPermissions)67 		Stream OpenStreamForWrite (string streamName, string templateStreamName, ref object writeContext, bool assertPermissions);
PrefetchAll(string configPath, string streamName)68 		bool PrefetchAll (string configPath, string streamName);
PrefetchSection(string sectionGroupName, string sectionName)69 		bool PrefetchSection (string sectionGroupName, string sectionName);
RequireCompleteInit(IInternalConfigRecord configRecord)70 		void RequireCompleteInit (IInternalConfigRecord configRecord);
StartMonitoringStreamForChanges(string streamName, StreamChangeCallback callback)71 		object StartMonitoringStreamForChanges (string streamName, StreamChangeCallback callback);
StopMonitoringStreamForChanges(string streamName, StreamChangeCallback callback)72 		void StopMonitoringStreamForChanges (string streamName, StreamChangeCallback callback);
VerifyDefinitionAllowed(string configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo)73 		void VerifyDefinitionAllowed (string configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo);
WriteCompleted(string streamName, bool success, object writeContext)74 		void WriteCompleted (string streamName, bool success, object writeContext);
WriteCompleted(string streamName, bool success, object writeContext, bool assertPermissions)75 		void WriteCompleted (string streamName, bool success, object writeContext, bool assertPermissions);
76 
77 		bool SupportsChangeNotifications { get; }
78 		bool SupportsLocation { get; }
79 		bool SupportsPath { get; }
80 		bool SupportsRefresh { get; }
81 	}
82 }
83 
84