diff --git a/SafeExamBrowser.Browser.Contracts/DownloadEventArgs.cs b/SafeExamBrowser.Browser.Contracts/Events/DownloadEventArgs.cs similarity index 94% rename from SafeExamBrowser.Browser.Contracts/DownloadEventArgs.cs rename to SafeExamBrowser.Browser.Contracts/Events/DownloadEventArgs.cs index b5f4881b..e1bb8003 100644 --- a/SafeExamBrowser.Browser.Contracts/DownloadEventArgs.cs +++ b/SafeExamBrowser.Browser.Contracts/Events/DownloadEventArgs.cs @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -namespace SafeExamBrowser.Browser.Contracts +namespace SafeExamBrowser.Browser.Contracts.Events { /// /// The event arguments used for all download events. diff --git a/SafeExamBrowser.Browser.Contracts/DownloadFinishedCallback.cs b/SafeExamBrowser.Browser.Contracts/Events/DownloadFinishedCallback.cs similarity index 92% rename from SafeExamBrowser.Browser.Contracts/DownloadFinishedCallback.cs rename to SafeExamBrowser.Browser.Contracts/Events/DownloadFinishedCallback.cs index 2e319ee5..c825d5e4 100644 --- a/SafeExamBrowser.Browser.Contracts/DownloadFinishedCallback.cs +++ b/SafeExamBrowser.Browser.Contracts/Events/DownloadFinishedCallback.cs @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -namespace SafeExamBrowser.Browser.Contracts +namespace SafeExamBrowser.Browser.Contracts.Events { /// /// Defines the method signature for callbacks to be executed once a download has been finished. Indicates whether the download was diff --git a/SafeExamBrowser.Browser.Contracts/DownloadRequestedEventHandler.cs b/SafeExamBrowser.Browser.Contracts/Events/DownloadRequestedEventHandler.cs similarity index 90% rename from SafeExamBrowser.Browser.Contracts/DownloadRequestedEventHandler.cs rename to SafeExamBrowser.Browser.Contracts/Events/DownloadRequestedEventHandler.cs index 1fc3c248..d19acb23 100644 --- a/SafeExamBrowser.Browser.Contracts/DownloadRequestedEventHandler.cs +++ b/SafeExamBrowser.Browser.Contracts/Events/DownloadRequestedEventHandler.cs @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -namespace SafeExamBrowser.Browser.Contracts +namespace SafeExamBrowser.Browser.Contracts.Events { /// /// Event handler used to control (e.g. allow or prohibit) download requests. diff --git a/SafeExamBrowser.Browser.Contracts/ProgressChangedEventHandler.cs b/SafeExamBrowser.Browser.Contracts/Events/ProgressChangedEventHandler.cs similarity index 91% rename from SafeExamBrowser.Browser.Contracts/ProgressChangedEventHandler.cs rename to SafeExamBrowser.Browser.Contracts/Events/ProgressChangedEventHandler.cs index 720664b8..b15d5b51 100644 --- a/SafeExamBrowser.Browser.Contracts/ProgressChangedEventHandler.cs +++ b/SafeExamBrowser.Browser.Contracts/Events/ProgressChangedEventHandler.cs @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -namespace SafeExamBrowser.Browser.Contracts +namespace SafeExamBrowser.Browser.Contracts.Events { /// /// Event handler used to indicate the current progress value of the page load process (from 0.0 to 1.0). diff --git a/SafeExamBrowser.Browser.Contracts/IBrowserApplication.cs b/SafeExamBrowser.Browser.Contracts/IBrowserApplication.cs index 40e259cd..8604a660 100644 --- a/SafeExamBrowser.Browser.Contracts/IBrowserApplication.cs +++ b/SafeExamBrowser.Browser.Contracts/IBrowserApplication.cs @@ -7,6 +7,7 @@ */ using SafeExamBrowser.Applications.Contracts; +using SafeExamBrowser.Browser.Contracts.Events; namespace SafeExamBrowser.Browser.Contracts { diff --git a/SafeExamBrowser.Browser.Contracts/SafeExamBrowser.Browser.Contracts.csproj b/SafeExamBrowser.Browser.Contracts/SafeExamBrowser.Browser.Contracts.csproj index 9b696f19..0027d68e 100644 --- a/SafeExamBrowser.Browser.Contracts/SafeExamBrowser.Browser.Contracts.csproj +++ b/SafeExamBrowser.Browser.Contracts/SafeExamBrowser.Browser.Contracts.csproj @@ -53,11 +53,11 @@ - - - + + + - + diff --git a/SafeExamBrowser.Browser/BrowserApplication.cs b/SafeExamBrowser.Browser/BrowserApplication.cs index 47d9ac0a..33ffe2b2 100644 --- a/SafeExamBrowser.Browser/BrowserApplication.cs +++ b/SafeExamBrowser.Browser/BrowserApplication.cs @@ -14,14 +14,14 @@ using CefSharp.WinForms; using SafeExamBrowser.Applications.Contracts; using SafeExamBrowser.Applications.Contracts.Events; using SafeExamBrowser.Browser.Contracts; +using SafeExamBrowser.Browser.Contracts.Events; using SafeExamBrowser.Browser.Events; using SafeExamBrowser.Configuration.Contracts; -using SafeExamBrowser.Core.Contracts; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.UserInterface.Contracts; using SafeExamBrowser.UserInterface.Contracts.MessageBox; -using BrowserSettings = SafeExamBrowser.Configuration.Contracts.Settings.BrowserSettings; +using BrowserSettings = SafeExamBrowser.Configuration.Contracts.Settings.Browser.BrowserSettings; namespace SafeExamBrowser.Browser { diff --git a/SafeExamBrowser.Browser/BrowserApplicationInstance.cs b/SafeExamBrowser.Browser/BrowserApplicationInstance.cs index 945c6140..7306fac5 100644 --- a/SafeExamBrowser.Browser/BrowserApplicationInstance.cs +++ b/SafeExamBrowser.Browser/BrowserApplicationInstance.cs @@ -10,12 +10,11 @@ using System; using System.Net.Http; using SafeExamBrowser.Applications.Contracts; using SafeExamBrowser.Applications.Contracts.Events; -using SafeExamBrowser.Browser.Contracts; +using SafeExamBrowser.Browser.Contracts.Events; using SafeExamBrowser.Browser.Events; using SafeExamBrowser.Browser.Handlers; using SafeExamBrowser.Configuration.Contracts; -using SafeExamBrowser.Configuration.Contracts.Settings; -using SafeExamBrowser.Core.Contracts; +using SafeExamBrowser.Configuration.Contracts.Settings.Browser; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.UserInterface.Contracts; @@ -84,6 +83,17 @@ namespace SafeExamBrowser.Browser } internal void Initialize() + { + InitializeControl(); + InitializeWindow(); + } + + internal void Terminate() + { + window?.Close(); + } + + private void InitializeControl() { var contextMenuHandler = new ContextMenuHandler(); var displayHandler = new DisplayHandler(); @@ -91,7 +101,8 @@ namespace SafeExamBrowser.Browser var downloadHandler = new DownloadHandler(appConfig, settings, downloadLogger); var keyboardHandler = new KeyboardHandler(); var lifeSpanHandler = new LifeSpanHandler(); - var requestHandler = new RequestHandler(appConfig); + var requestLogger = logger.CloneFor($"{nameof(RequestHandler)} {Id}"); + var requestHandler = new RequestHandler(appConfig, settings, logger); displayHandler.FaviconChanged += DisplayHandler_FaviconChanged; displayHandler.ProgressChanged += DisplayHandler_ProgressChanged; @@ -109,7 +120,10 @@ namespace SafeExamBrowser.Browser control.Initialize(); logger.Debug("Initialized browser control."); + } + private void InitializeWindow() + { window = uiFactory.CreateBrowserWindow(control, settings, isMainInstance); window.Closing += () => Terminated?.Invoke(Id); window.AddressChanged += Window_AddressChanged; @@ -126,11 +140,6 @@ namespace SafeExamBrowser.Browser logger.Debug("Initialized browser window."); } - internal void Terminate() - { - window?.Close(); - } - private void Control_AddressChanged(string address) { logger.Debug($"Navigated to '{address}'."); diff --git a/SafeExamBrowser.Network.Contracts/Request.cs b/SafeExamBrowser.Browser/Filters/RequestFilter.cs similarity index 54% rename from SafeExamBrowser.Network.Contracts/Request.cs rename to SafeExamBrowser.Browser/Filters/RequestFilter.cs index 687d1366..94b72035 100644 --- a/SafeExamBrowser.Network.Contracts/Request.cs +++ b/SafeExamBrowser.Browser/Filters/RequestFilter.cs @@ -7,17 +7,20 @@ */ using System; +using SafeExamBrowser.Configuration.Contracts.Settings.Browser; -namespace SafeExamBrowser.Network.Contracts +namespace SafeExamBrowser.Browser.Filters { - /// - /// Defines a network request. - /// - public class Request + internal class RequestFilter { - /// - /// The uri of the request. - /// - public Uri Uri { get; set; } + internal void Load(FilterRule rule) + { + + } + + internal FilterResult Process(Uri request) + { + return FilterResult.Allow; + } } } diff --git a/SafeExamBrowser.Browser/Handlers/DisplayHandler.cs b/SafeExamBrowser.Browser/Handlers/DisplayHandler.cs index b9bc5f11..285e7316 100644 --- a/SafeExamBrowser.Browser/Handlers/DisplayHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/DisplayHandler.cs @@ -10,8 +10,8 @@ using System.Collections.Generic; using System.Linq; using CefSharp; using CefSharp.Structs; +using SafeExamBrowser.Browser.Contracts.Events; using SafeExamBrowser.Browser.Events; -using SafeExamBrowser.Browser.Contracts; namespace SafeExamBrowser.Browser.Handlers { diff --git a/SafeExamBrowser.Browser/Handlers/DownloadHandler.cs b/SafeExamBrowser.Browser/Handlers/DownloadHandler.cs index be35a3bf..466b0a63 100644 --- a/SafeExamBrowser.Browser/Handlers/DownloadHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/DownloadHandler.cs @@ -11,10 +11,10 @@ using System.Collections.Concurrent; using System.IO; using System.Threading.Tasks; using CefSharp; -using SafeExamBrowser.Browser.Contracts; +using SafeExamBrowser.Browser.Contracts.Events; using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Logging.Contracts; -using BrowserSettings = SafeExamBrowser.Configuration.Contracts.Settings.BrowserSettings; +using BrowserSettings = SafeExamBrowser.Configuration.Contracts.Settings.Browser.BrowserSettings; namespace SafeExamBrowser.Browser.Handlers { diff --git a/SafeExamBrowser.Browser/Handlers/RequestHandler.cs b/SafeExamBrowser.Browser/Handlers/RequestHandler.cs index e7f53e3c..d47bbcff 100644 --- a/SafeExamBrowser.Browser/Handlers/RequestHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/RequestHandler.cs @@ -7,19 +7,41 @@ */ using CefSharp; +using SafeExamBrowser.Browser.Filters; using SafeExamBrowser.Configuration.Contracts; +using SafeExamBrowser.Logging.Contracts; +using BrowserSettings = SafeExamBrowser.Configuration.Contracts.Settings.Browser.BrowserSettings; namespace SafeExamBrowser.Browser.Handlers { internal class RequestHandler : CefSharp.Handler.RequestHandler { private AppConfig appConfig; + private BrowserSettings settings; + private RequestFilter filter; + private ILogger logger; private ResourceRequestHandler resourceRequestHandler; - internal RequestHandler(AppConfig appConfig) + internal RequestHandler(AppConfig appConfig, BrowserSettings settings, ILogger logger) { this.appConfig = appConfig; - this.resourceRequestHandler = new ResourceRequestHandler(appConfig); + this.settings = settings; + this.filter = new RequestFilter(); + this.logger = logger; + this.resourceRequestHandler = new ResourceRequestHandler(appConfig, settings, logger); + } + + internal void Initiailize() + { + if (settings.FilterMainRequests || settings.FilterContentRequests) + { + foreach (var rule in settings.FilterRules) + { + filter.Load(rule); + } + + logger.Debug("Initialized request filter."); + } } protected override IResourceRequestHandler GetResourceRequestHandler(IWebBrowser webBrowser, IBrowser browser, IFrame frame, IRequest request, bool isNavigation, bool isDownload, string requestInitiator, ref bool disableDefaultHandling) diff --git a/SafeExamBrowser.Browser/Handlers/ResourceRequestHandler.cs b/SafeExamBrowser.Browser/Handlers/ResourceRequestHandler.cs index 17e76c82..ea56c2cd 100644 --- a/SafeExamBrowser.Browser/Handlers/ResourceRequestHandler.cs +++ b/SafeExamBrowser.Browser/Handlers/ResourceRequestHandler.cs @@ -10,19 +10,35 @@ using System; using System.Collections.Specialized; using CefSharp; using SafeExamBrowser.Configuration.Contracts; +using SafeExamBrowser.Logging.Contracts; +using BrowserSettings = SafeExamBrowser.Configuration.Contracts.Settings.Browser.BrowserSettings; namespace SafeExamBrowser.Browser.Handlers { internal class ResourceRequestHandler : CefSharp.Handler.ResourceRequestHandler { private AppConfig appConfig; + private BrowserSettings settings; + private ILogger logger; - internal ResourceRequestHandler(AppConfig appConfig) + internal ResourceRequestHandler(AppConfig appConfig, BrowserSettings settings, ILogger logger) { this.appConfig = appConfig; + this.settings = settings; + this.logger = logger; } - protected override CefReturnValue OnBeforeResourceLoad(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IRequestCallback callback) + protected override IResourceHandler GetResourceHandler(IWebBrowser webBrowser, IBrowser browser, IFrame frame, IRequest request) + { + if (FilterMainRequest(request) || FilterContentRequest(request)) + { + return ResourceHandler.FromString("Blocked!"); + } + + return base.GetResourceHandler(webBrowser, browser, frame, request); + } + + protected override CefReturnValue OnBeforeResourceLoad(IWebBrowser webBrowser, IBrowser browser, IFrame frame, IRequest request, IRequestCallback callback) { // TODO: CEF does not yet support intercepting requests from service workers, thus the user agent must be statically set at browser // startup for now. Once CEF has full support of service workers, the static user agent should be removed and the method below @@ -36,7 +52,7 @@ namespace SafeExamBrowser.Browser.Handlers ReplaceCustomScheme(request); - return base.OnBeforeResourceLoad(browserControl, browser, frame, request, callback); + return base.OnBeforeResourceLoad(webBrowser, browser, frame, request, callback); } private void AppendCustomUserAgent(IRequest request) @@ -48,6 +64,16 @@ namespace SafeExamBrowser.Browser.Handlers request.Headers = headers; } + private bool FilterContentRequest(IRequest request) + { + return settings.FilterContentRequests && request.ResourceType != ResourceType.MainFrame; + } + + private bool FilterMainRequest(IRequest request) + { + return settings.FilterMainRequests && request.ResourceType == ResourceType.MainFrame; + } + private bool IsMailtoUrl(string url) { return url.StartsWith(Uri.UriSchemeMailto); diff --git a/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj b/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj index 0cc1430c..94619277 100644 --- a/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj +++ b/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj @@ -71,6 +71,7 @@ + Component diff --git a/SafeExamBrowser.Client.UnitTests/ClientControllerTests.cs b/SafeExamBrowser.Client.UnitTests/ClientControllerTests.cs index 5bc7d4e9..230e4bc1 100644 --- a/SafeExamBrowser.Client.UnitTests/ClientControllerTests.cs +++ b/SafeExamBrowser.Client.UnitTests/ClientControllerTests.cs @@ -10,6 +10,7 @@ using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using SafeExamBrowser.Browser.Contracts; +using SafeExamBrowser.Browser.Contracts.Events; using SafeExamBrowser.Communication.Contracts.Data; using SafeExamBrowser.Communication.Contracts.Events; using SafeExamBrowser.Communication.Contracts.Hosts; @@ -21,7 +22,6 @@ using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.Logging.Contracts; -using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Display; using SafeExamBrowser.Monitoring.Contracts.Processes; using SafeExamBrowser.Monitoring.Contracts.Windows; diff --git a/SafeExamBrowser.Client/ClientController.cs b/SafeExamBrowser.Client/ClientController.cs index 2a401992..4ab55bf3 100644 --- a/SafeExamBrowser.Client/ClientController.cs +++ b/SafeExamBrowser.Client/ClientController.cs @@ -9,6 +9,7 @@ using System; using System.IO; using SafeExamBrowser.Browser.Contracts; +using SafeExamBrowser.Browser.Contracts.Events; using SafeExamBrowser.Client.Contracts; using SafeExamBrowser.Communication.Contracts.Data; using SafeExamBrowser.Communication.Contracts.Events; diff --git a/SafeExamBrowser.Client/CompositionRoot.cs b/SafeExamBrowser.Client/CompositionRoot.cs index 52c28851..84fc1f09 100644 --- a/SafeExamBrowser.Client/CompositionRoot.cs +++ b/SafeExamBrowser.Client/CompositionRoot.cs @@ -203,7 +203,7 @@ namespace SafeExamBrowser.Client private IOperation BuildBrowserOperation() { - var moduleLogger = new ModuleLogger(logger, "BrowserController"); + var moduleLogger = new ModuleLogger(logger, nameof(BrowserApplication)); var browser = new BrowserApplication(configuration.AppConfig, configuration.Settings.Browser, messageBox, moduleLogger, text, uiFactory); var browserInfo = new BrowserApplicationInfo(); var operation = new BrowserOperation(actionCenter, browser, logger, taskbar, uiFactory); diff --git a/SafeExamBrowser.Configuration.Contracts/SafeExamBrowser.Configuration.Contracts.csproj b/SafeExamBrowser.Configuration.Contracts/SafeExamBrowser.Configuration.Contracts.csproj index 71ebbb29..88729292 100644 --- a/SafeExamBrowser.Configuration.Contracts/SafeExamBrowser.Configuration.Contracts.csproj +++ b/SafeExamBrowser.Configuration.Contracts/SafeExamBrowser.Configuration.Contracts.csproj @@ -78,13 +78,15 @@ - - + + + + + - @@ -96,10 +98,6 @@ {64ea30fb-11d4-436a-9c2b-88566285363e} SafeExamBrowser.Logging.Contracts - - {2947da3c-61f3-44be-81cf-d1d5c10aec95} - SafeExamBrowser.Network.Contracts - \ No newline at end of file diff --git a/SafeExamBrowser.Configuration.Contracts/Settings/BrowserSettings.cs b/SafeExamBrowser.Configuration.Contracts/Settings/Browser/BrowserSettings.cs similarity index 74% rename from SafeExamBrowser.Configuration.Contracts/Settings/BrowserSettings.cs rename to SafeExamBrowser.Configuration.Contracts/Settings/Browser/BrowserSettings.cs index 2004e035..cab3b476 100644 --- a/SafeExamBrowser.Configuration.Contracts/Settings/BrowserSettings.cs +++ b/SafeExamBrowser.Configuration.Contracts/Settings/Browser/BrowserSettings.cs @@ -7,8 +7,9 @@ */ using System; +using System.Collections.Generic; -namespace SafeExamBrowser.Configuration.Contracts.Settings +namespace SafeExamBrowser.Configuration.Contracts.Settings.Browser { /// /// Defines all configuration options for the browser engine of the application. @@ -46,6 +47,21 @@ namespace SafeExamBrowser.Configuration.Contracts.Settings /// public string CustomUserAgent { get; set; } + /// + /// Defines whether all content requests for a web page should be filtered according to the defined . + /// + public bool FilterContentRequests { get; set; } + + /// + /// Defines whether the main request for a web page should be filtered according to the defined . + /// + public bool FilterMainRequests { get; set; } + + /// + /// Defines all rules to be used to filter web requests. + /// + public IList FilterRules { get; set; } + /// /// The configuration to be used for the main browser window. /// @@ -64,6 +80,7 @@ namespace SafeExamBrowser.Configuration.Contracts.Settings public BrowserSettings() { AdditionalWindowSettings = new BrowserWindowSettings(); + FilterRules = new List(); MainWindowSettings = new BrowserWindowSettings(); } } diff --git a/SafeExamBrowser.Configuration.Contracts/Settings/BrowserWindowSettings.cs b/SafeExamBrowser.Configuration.Contracts/Settings/Browser/BrowserWindowSettings.cs similarity index 96% rename from SafeExamBrowser.Configuration.Contracts/Settings/BrowserWindowSettings.cs rename to SafeExamBrowser.Configuration.Contracts/Settings/Browser/BrowserWindowSettings.cs index 9a253d40..ecd3bab9 100644 --- a/SafeExamBrowser.Configuration.Contracts/Settings/BrowserWindowSettings.cs +++ b/SafeExamBrowser.Configuration.Contracts/Settings/Browser/BrowserWindowSettings.cs @@ -8,7 +8,7 @@ using System; -namespace SafeExamBrowser.Configuration.Contracts.Settings +namespace SafeExamBrowser.Configuration.Contracts.Settings.Browser { /// /// Defines all configuration options for a window of the browser engine. diff --git a/SafeExamBrowser.Network.Contracts/Filter/FilterResult.cs b/SafeExamBrowser.Configuration.Contracts/Settings/Browser/FilterResult.cs similarity index 71% rename from SafeExamBrowser.Network.Contracts/Filter/FilterResult.cs rename to SafeExamBrowser.Configuration.Contracts/Settings/Browser/FilterResult.cs index d38308ab..2e123d8e 100644 --- a/SafeExamBrowser.Network.Contracts/Filter/FilterResult.cs +++ b/SafeExamBrowser.Configuration.Contracts/Settings/Browser/FilterResult.cs @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -namespace SafeExamBrowser.Network.Contracts.Filter +namespace SafeExamBrowser.Configuration.Contracts.Settings.Browser { /// /// Defines all possible results of a request filter operation. @@ -14,12 +14,12 @@ namespace SafeExamBrowser.Network.Contracts.Filter public enum FilterResult { /// - /// Indicates that a request should be allowed. + /// Indicates that a request should be allowed if a filter matches. /// Allow, /// - /// Indicates that a request should be blocked. + /// Indicates that a request should be blocked if a filter matches. /// Block } diff --git a/SafeExamBrowser.Network.Contracts/Filter/FilterRule.cs b/SafeExamBrowser.Configuration.Contracts/Settings/Browser/FilterRule.cs similarity index 89% rename from SafeExamBrowser.Network.Contracts/Filter/FilterRule.cs rename to SafeExamBrowser.Configuration.Contracts/Settings/Browser/FilterRule.cs index c9f83ac0..29490037 100644 --- a/SafeExamBrowser.Network.Contracts/Filter/FilterRule.cs +++ b/SafeExamBrowser.Configuration.Contracts/Settings/Browser/FilterRule.cs @@ -8,10 +8,10 @@ using System; -namespace SafeExamBrowser.Network.Contracts.Filter +namespace SafeExamBrowser.Configuration.Contracts.Settings.Browser { /// - /// Defines a network filter rule. + /// Defines a request filter rule. /// [Serializable] public class FilterRule diff --git a/SafeExamBrowser.Network.Contracts/Filter/FilterType.cs b/SafeExamBrowser.Configuration.Contracts/Settings/Browser/FilterType.cs similarity index 90% rename from SafeExamBrowser.Network.Contracts/Filter/FilterType.cs rename to SafeExamBrowser.Configuration.Contracts/Settings/Browser/FilterType.cs index 11798093..a54a900d 100644 --- a/SafeExamBrowser.Network.Contracts/Filter/FilterType.cs +++ b/SafeExamBrowser.Configuration.Contracts/Settings/Browser/FilterType.cs @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -namespace SafeExamBrowser.Network.Contracts.Filter +namespace SafeExamBrowser.Configuration.Contracts.Settings.Browser { /// /// Defines all possible request filter types. diff --git a/SafeExamBrowser.Configuration.Contracts/Settings/NetworkSettings.cs b/SafeExamBrowser.Configuration.Contracts/Settings/NetworkSettings.cs deleted file mode 100644 index 0b8b3691..00000000 --- a/SafeExamBrowser.Configuration.Contracts/Settings/NetworkSettings.cs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -using System; -using System.Collections.Generic; -using SafeExamBrowser.Network.Contracts.Filter; - -namespace SafeExamBrowser.Configuration.Contracts.Settings -{ - /// - /// Defines all configuration options for network functionality. - /// - [Serializable] - public class NetworkSettings - { - /// - /// Defines whether all content requests for a web page should be filtered according to the defined . - /// - public bool FilterContentRequests { get; set; } - - /// - /// Defines whether the main request for a web page should be filtered according to the defined . - /// - public bool FilterMainRequests { get; set; } - - /// - /// Defines all rules to be used to filter network requests. - /// - public IList FilterRules { get; set; } - - public NetworkSettings() - { - FilterRules = new List(); - } - } -} diff --git a/SafeExamBrowser.Configuration.Contracts/Settings/Settings.cs b/SafeExamBrowser.Configuration.Contracts/Settings/Settings.cs index 06a821bd..e35ed21d 100644 --- a/SafeExamBrowser.Configuration.Contracts/Settings/Settings.cs +++ b/SafeExamBrowser.Configuration.Contracts/Settings/Settings.cs @@ -7,6 +7,7 @@ */ using System; +using SafeExamBrowser.Configuration.Contracts.Settings.Browser; using SafeExamBrowser.Logging.Contracts; namespace SafeExamBrowser.Configuration.Contracts.Settings @@ -67,11 +68,6 @@ namespace SafeExamBrowser.Configuration.Contracts.Settings /// public MouseSettings Mouse { get; set; } - /// - /// All network-related settings. - /// - public NetworkSettings Network { get; set; } - /// /// The hash code of the quit password. /// @@ -99,7 +95,6 @@ namespace SafeExamBrowser.Configuration.Contracts.Settings Browser = new BrowserSettings(); Keyboard = new KeyboardSettings(); Mouse = new MouseSettings(); - Network = new NetworkSettings(); Service = new ServiceSettings(); Taskbar = new TaskbarSettings(); } diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Browser.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Browser.cs index 9a1bade0..00279e40 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Browser.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Browser.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using SafeExamBrowser.Configuration.Contracts.Settings; +using SafeExamBrowser.Configuration.Contracts.Settings.Browser; namespace SafeExamBrowser.Configuration.ConfigurationData { @@ -104,6 +105,55 @@ namespace SafeExamBrowser.Configuration.ConfigurationData } } + private void MapEnableContentRequestFilter(Settings settings, object value) + { + if (value is bool filter) + { + settings.Browser.FilterContentRequests = filter; + } + } + + private void MapEnableMainRequestFilter(Settings settings, object value) + { + if (value is bool filter) + { + settings.Browser.FilterMainRequests = filter; + } + } + + private void MapUrlFilterRules(Settings settings, object value) + { + const int ALLOW = 1; + + if (value is IEnumerable> ruleDataList) + { + foreach (var ruleData in ruleDataList) + { + if (ruleData.TryGetValue(Keys.Browser.Filter.RuleIsActive, out var v) && v is bool active && active) + { + var rule = new FilterRule(); + + if (ruleData.TryGetValue(Keys.Browser.Filter.RuleExpression, out v) && v is string expression) + { + rule.Expression = expression; + } + + if (ruleData.TryGetValue(Keys.Browser.Filter.RuleAction, out v) && v is int action) + { + rule.Result = action == ALLOW ? FilterResult.Allow : FilterResult.Block; + } + + if (ruleData.TryGetValue(Keys.Browser.Filter.RuleExpressionIsRegex, out v) && v is bool regex) + { + rule.Type = regex ? FilterType.Regex : FilterType.Simplified; + } + + settings.Browser.FilterRules.Add(rule); + } + } + } + } + private void MapMainWindowMode(Settings settings, object value) { const int FULLSCREEN = 1; diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Network.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Network.cs deleted file mode 100644 index b9a4ab01..00000000 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.Network.cs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -using System.Collections.Generic; -using SafeExamBrowser.Configuration.Contracts.Settings; -using SafeExamBrowser.Network.Contracts.Filter; - -namespace SafeExamBrowser.Configuration.ConfigurationData -{ - internal partial class DataMapper - { - private void MapEnableContentRequestFilter(Settings settings, object value) - { - if (value is bool filter) - { - settings.Network.FilterContentRequests = filter; - } - } - - private void MapEnableMainRequestFilter(Settings settings, object value) - { - if (value is bool filter) - { - settings.Network.FilterMainRequests = filter; - } - } - - private void MapUrlFilterRules(Settings settings, object value) - { - const int ALLOW = 1; - - if (value is IEnumerable> ruleDataList) - { - foreach (var ruleData in ruleDataList) - { - if (ruleData.TryGetValue(Keys.Network.Filter.RuleIsActive, out var v) && v is bool active && active) - { - var rule = new FilterRule(); - - if (ruleData.TryGetValue(Keys.Network.Filter.RuleExpression, out v) && v is string expression) - { - rule.Expression = expression; - } - - if (ruleData.TryGetValue(Keys.Network.Filter.RuleAction, out v) && v is int action) - { - rule.Result = action == ALLOW ? FilterResult.Allow : FilterResult.Block ; - } - - if (ruleData.TryGetValue(Keys.Network.Filter.RuleExpressionIsRegex, out v) && v is bool regex) - { - rule.Type = regex ? FilterType.Regex : FilterType.Simplified; - } - - settings.Network.FilterRules.Add(rule); - } - } - } - } - } -} diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.cs index f6c20178..ee95b32d 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapper.cs @@ -22,7 +22,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData MapConfigurationFileSettings(item.Key, item.Value, settings); MapGeneralSettings(item.Key, item.Value, settings); MapInputSettings(item.Key, item.Value, settings); - MapNetworkSettings(item.Key, item.Value, settings); MapSecuritySettings(item.Key, item.Value, settings); MapUserInterfaceSettings(item.Key, item.Value, settings); } @@ -70,18 +69,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData case Keys.Browser.MainWindowMode: MapMainWindowMode(settings, value); break; - case Keys.Browser.MainWindow.AllowAddressBar: - MapAllowAddressBar(settings, value); - break; - case Keys.Browser.MainWindow.AllowNavigation: - MapAllowNavigation(settings, value); - break; - case Keys.Browser.MainWindow.AllowReload: - MapAllowReload(settings, value); - break; - case Keys.Browser.MainWindow.ShowReloadWarning: - MapShowReloadWarning(settings, value); - break; case Keys.Browser.AdditionalWindow.AllowAddressBar: MapAllowAddressBarAdditionalWindow(settings, value); break; @@ -94,6 +81,27 @@ namespace SafeExamBrowser.Configuration.ConfigurationData case Keys.Browser.AdditionalWindow.ShowReloadWarning: MapShowReloadWarningAdditionalWindow(settings, value); break; + case Keys.Browser.Filter.EnableContentRequestFilter: + MapEnableContentRequestFilter(settings, value); + break; + case Keys.Browser.Filter.EnableMainRequestFilter: + MapEnableMainRequestFilter(settings, value); + break; + case Keys.Browser.Filter.UrlFilterRules: + MapUrlFilterRules(settings, value); + break; + case Keys.Browser.MainWindow.AllowAddressBar: + MapAllowAddressBar(settings, value); + break; + case Keys.Browser.MainWindow.AllowNavigation: + MapAllowNavigation(settings, value); + break; + case Keys.Browser.MainWindow.AllowReload: + MapAllowReload(settings, value); + break; + case Keys.Browser.MainWindow.ShowReloadWarning: + MapShowReloadWarning(settings, value); + break; } } @@ -193,22 +201,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData } } - private void MapNetworkSettings(string key, object value, Settings settings) - { - switch (key) - { - case Keys.Network.Filter.EnableContentRequestFilter: - MapEnableContentRequestFilter(settings, value); - break; - case Keys.Network.Filter.EnableMainRequestFilter: - MapEnableMainRequestFilter(settings, value); - break; - case Keys.Network.Filter.UrlFilterRules: - MapUrlFilterRules(settings, value); - break; - } - } - private void MapSecuritySettings(string key, object value, Settings settings) { switch (key) diff --git a/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs b/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs index 9ca8d937..67e8b6d5 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs @@ -38,6 +38,17 @@ namespace SafeExamBrowser.Configuration.ConfigurationData internal const string UserAgentModeDesktop = "browserUserAgentWinDesktopMode"; internal const string UserAgentModeMobile = "browserUserAgentWinTouchMode"; + internal static class Filter + { + internal const string EnableContentRequestFilter = "URLFilterEnableContentFilter"; + internal const string EnableMainRequestFilter = "URLFilterEnable"; + internal const string RuleAction = "action"; + internal const string RuleIsActive = "active"; + internal const string RuleExpression = "expression"; + internal const string RuleExpressionIsRegex = "regex"; + internal const string UrlFilterRules = "URLFilterRules"; + } + internal static class MainWindow { internal const string AllowAddressBar = "browserWindowAllowAddressBar"; @@ -113,17 +124,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData internal const string CertificateType = "type"; internal const string EmbeddedCertificates = "embeddedCertificates"; } - - internal static class Filter - { - internal const string EnableContentRequestFilter = "URLFilterEnableContentFilter"; - internal const string EnableMainRequestFilter = "URLFilterEnable"; - internal const string RuleAction = "action"; - internal const string RuleIsActive = "active"; - internal const string RuleExpression = "expression"; - internal const string RuleExpressionIsRegex = "regex"; - internal const string UrlFilterRules = "URLFilterRules"; - } } internal static class Registry diff --git a/SafeExamBrowser.Configuration/SafeExamBrowser.Configuration.csproj b/SafeExamBrowser.Configuration/SafeExamBrowser.Configuration.csproj index 4303108e..4e11e3b1 100644 --- a/SafeExamBrowser.Configuration/SafeExamBrowser.Configuration.csproj +++ b/SafeExamBrowser.Configuration/SafeExamBrowser.Configuration.csproj @@ -81,9 +81,6 @@ DataMapper.cs - - DataMapper.cs - DataMapper.cs @@ -110,10 +107,6 @@ {64ea30fb-11d4-436a-9c2b-88566285363e} SafeExamBrowser.Logging.Contracts - - {2947da3c-61f3-44be-81cf-d1d5c10aec95} - SafeExamBrowser.Network.Contracts - \ No newline at end of file diff --git a/SafeExamBrowser.Network.Contracts/Filter/IRequestFilter.cs b/SafeExamBrowser.Network.Contracts/Filter/IRequestFilter.cs deleted file mode 100644 index b8590539..00000000 --- a/SafeExamBrowser.Network.Contracts/Filter/IRequestFilter.cs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -namespace SafeExamBrowser.Network.Contracts.Filter -{ - /// - /// Defines a filter to process network requests. - /// - public interface IRequestFilter - { - /// - /// Defines the default result to be returned by if no filter rule matches. - /// - FilterResult Default { set; } - - /// - /// Loads the given to be used when processing a request. - /// - void Load(FilterRule rule); - - /// - /// Filters the given request according to the loaded . - /// - FilterResult Process(Request request); - } -} diff --git a/SafeExamBrowser.Network.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.Network.Contracts/Properties/AssemblyInfo.cs deleted file mode 100644 index 9577fd16..00000000 --- a/SafeExamBrowser.Network.Contracts/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SafeExamBrowser.Network.Contracts")] -[assembly: AssemblyDescription("Safe Exam Browser")] -[assembly: AssemblyCompany("ETH Zürich")] -[assembly: AssemblyProduct("SafeExamBrowser.Network.Contracts")] -[assembly: AssemblyCopyright("Copyright © 2019 ETH Zürich, Educational Development and Technology (LET)")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("2947da3c-61f3-44be-81cf-d1d5c10aec95")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: AssemblyInformationalVersion("1.0.0.0")] diff --git a/SafeExamBrowser.Network.Contracts/SafeExamBrowser.Network.Contracts.csproj b/SafeExamBrowser.Network.Contracts/SafeExamBrowser.Network.Contracts.csproj deleted file mode 100644 index 06b53537..00000000 --- a/SafeExamBrowser.Network.Contracts/SafeExamBrowser.Network.Contracts.csproj +++ /dev/null @@ -1,64 +0,0 @@ - - - - - Debug - AnyCPU - {2947DA3C-61F3-44BE-81CF-D1D5C10AEC95} - Library - Properties - SafeExamBrowser.Network.Contracts - SafeExamBrowser.Network.Contracts - v4.7.2 - 512 - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - - - bin\x86\Release\ - TRACE - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SafeExamBrowser.Network/Filter/RequestFilter.cs b/SafeExamBrowser.Network/Filter/RequestFilter.cs deleted file mode 100644 index 198cad30..00000000 --- a/SafeExamBrowser.Network/Filter/RequestFilter.cs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -using System; -using SafeExamBrowser.Network.Contracts; -using SafeExamBrowser.Network.Contracts.Filter; - -namespace SafeExamBrowser.Network.Filter -{ - public class RequestFilter : IRequestFilter - { - public FilterResult Default { private get; set; } - - public void Load(FilterRule rule) - { - throw new NotImplementedException(); - } - - public FilterResult Process(Request request) - { - throw new NotImplementedException(); - } - } -} diff --git a/SafeExamBrowser.Network/Properties/AssemblyInfo.cs b/SafeExamBrowser.Network/Properties/AssemblyInfo.cs deleted file mode 100644 index 9f98c533..00000000 --- a/SafeExamBrowser.Network/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SafeExamBrowser.Network")] -[assembly: AssemblyDescription("Safe Exam Browser")] -[assembly: AssemblyCompany("ETH Zürich")] -[assembly: AssemblyProduct("SafeExamBrowser.Network")] -[assembly: AssemblyCopyright("Copyright © 2019 ETH Zürich, Educational Development and Technology (LET)")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("2da8f505-51be-48c8-b32b-5e753e936dec")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: AssemblyInformationalVersion("1.0.0.0")] diff --git a/SafeExamBrowser.Network/SafeExamBrowser.Network.csproj b/SafeExamBrowser.Network/SafeExamBrowser.Network.csproj deleted file mode 100644 index 443b5021..00000000 --- a/SafeExamBrowser.Network/SafeExamBrowser.Network.csproj +++ /dev/null @@ -1,67 +0,0 @@ - - - - - Debug - AnyCPU - {2DA8F505-51BE-48C8-B32B-5E753E936DEC} - Library - Properties - SafeExamBrowser.Network - SafeExamBrowser.Network - v4.7.2 - 512 - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - - - bin\x86\Release\ - TRACE - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - - - - - - - - - - - - - {2947da3c-61f3-44be-81cf-d1d5c10aec95} - SafeExamBrowser.Network.Contracts - - - - \ No newline at end of file diff --git a/SafeExamBrowser.UserInterface.Contracts/IUserInterfaceFactory.cs b/SafeExamBrowser.UserInterface.Contracts/IUserInterfaceFactory.cs index 1a157022..77009a4e 100644 --- a/SafeExamBrowser.UserInterface.Contracts/IUserInterfaceFactory.cs +++ b/SafeExamBrowser.UserInterface.Contracts/IUserInterfaceFactory.cs @@ -9,7 +9,7 @@ using SafeExamBrowser.Applications.Contracts; using SafeExamBrowser.Client.Contracts; using SafeExamBrowser.Configuration.Contracts; -using SafeExamBrowser.Configuration.Contracts.Settings; +using SafeExamBrowser.Configuration.Contracts.Settings.Browser; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.SystemComponents.Contracts.Audio; diff --git a/SafeExamBrowser.UserInterface.Desktop/BrowserWindow.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/BrowserWindow.xaml.cs index 62fd4534..e762685d 100644 --- a/SafeExamBrowser.UserInterface.Desktop/BrowserWindow.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/BrowserWindow.xaml.cs @@ -14,7 +14,7 @@ using System.Windows.Controls.Primitives; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; -using SafeExamBrowser.Configuration.Contracts.Settings; +using SafeExamBrowser.Configuration.Contracts.Settings.Browser; using SafeExamBrowser.Core.Contracts; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.UserInterface.Contracts; diff --git a/SafeExamBrowser.UserInterface.Desktop/UserInterfaceFactory.cs b/SafeExamBrowser.UserInterface.Desktop/UserInterfaceFactory.cs index 53218625..75dc9a05 100644 --- a/SafeExamBrowser.UserInterface.Desktop/UserInterfaceFactory.cs +++ b/SafeExamBrowser.UserInterface.Desktop/UserInterfaceFactory.cs @@ -13,7 +13,7 @@ using FontAwesome.WPF; using SafeExamBrowser.Applications.Contracts; using SafeExamBrowser.Client.Contracts; using SafeExamBrowser.Configuration.Contracts; -using SafeExamBrowser.Configuration.Contracts.Settings; +using SafeExamBrowser.Configuration.Contracts.Settings.Browser; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.SystemComponents.Contracts.Audio; diff --git a/SafeExamBrowser.UserInterface.Mobile/BrowserWindow.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/BrowserWindow.xaml.cs index f82228b5..3fe99c00 100644 --- a/SafeExamBrowser.UserInterface.Mobile/BrowserWindow.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/BrowserWindow.xaml.cs @@ -14,7 +14,7 @@ using System.Windows.Controls.Primitives; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; -using SafeExamBrowser.Configuration.Contracts.Settings; +using SafeExamBrowser.Configuration.Contracts.Settings.Browser; using SafeExamBrowser.Core.Contracts; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.UserInterface.Contracts; diff --git a/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs b/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs index d0211206..95d0584d 100644 --- a/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs +++ b/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs @@ -13,7 +13,7 @@ using FontAwesome.WPF; using SafeExamBrowser.Applications.Contracts; using SafeExamBrowser.Client.Contracts; using SafeExamBrowser.Configuration.Contracts; -using SafeExamBrowser.Configuration.Contracts.Settings; +using SafeExamBrowser.Configuration.Contracts.Settings.Browser; using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.SystemComponents.Contracts.Audio; diff --git a/SafeExamBrowser.sln b/SafeExamBrowser.sln index 05febaff..73ce335d 100644 --- a/SafeExamBrowser.sln +++ b/SafeExamBrowser.sln @@ -92,8 +92,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Logging.Con EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Monitoring.Contracts", "SafeExamBrowser.Monitoring.Contracts\SafeExamBrowser.Monitoring.Contracts.csproj", "{6D563A30-366D-4C35-815B-2C9E6872278B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Network.Contracts", "SafeExamBrowser.Network.Contracts\SafeExamBrowser.Network.Contracts.csproj", "{2947DA3C-61F3-44BE-81CF-D1D5C10AEC95}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Runtime.Contracts", "SafeExamBrowser.Runtime.Contracts\SafeExamBrowser.Runtime.Contracts.csproj", "{5D0136B4-6D21-4F99-AE42-3FB7F478AE0A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Service.Contracts", "SafeExamBrowser.Service.Contracts\SafeExamBrowser.Service.Contracts.csproj", "{5167820F-2BE5-43CF-B1CC-E4874BF83808}" @@ -104,8 +102,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.UserInterfa EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.WindowsApi.Contracts", "SafeExamBrowser.WindowsApi.Contracts\SafeExamBrowser.WindowsApi.Contracts.csproj", "{7016F080-9AA5-41B2-A225-385AD877C171}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Network", "SafeExamBrowser.Network\SafeExamBrowser.Network.csproj", "{2DA8F505-51BE-48C8-B32B-5E753E936DEC}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -420,14 +416,6 @@ Global {6D563A30-366D-4C35-815B-2C9E6872278B}.Release|Any CPU.Build.0 = Release|Any CPU {6D563A30-366D-4C35-815B-2C9E6872278B}.Release|x86.ActiveCfg = Release|x86 {6D563A30-366D-4C35-815B-2C9E6872278B}.Release|x86.Build.0 = Release|x86 - {2947DA3C-61F3-44BE-81CF-D1D5C10AEC95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2947DA3C-61F3-44BE-81CF-D1D5C10AEC95}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2947DA3C-61F3-44BE-81CF-D1D5C10AEC95}.Debug|x86.ActiveCfg = Debug|x86 - {2947DA3C-61F3-44BE-81CF-D1D5C10AEC95}.Debug|x86.Build.0 = Debug|x86 - {2947DA3C-61F3-44BE-81CF-D1D5C10AEC95}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2947DA3C-61F3-44BE-81CF-D1D5C10AEC95}.Release|Any CPU.Build.0 = Release|Any CPU - {2947DA3C-61F3-44BE-81CF-D1D5C10AEC95}.Release|x86.ActiveCfg = Release|x86 - {2947DA3C-61F3-44BE-81CF-D1D5C10AEC95}.Release|x86.Build.0 = Release|x86 {5D0136B4-6D21-4F99-AE42-3FB7F478AE0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5D0136B4-6D21-4F99-AE42-3FB7F478AE0A}.Debug|Any CPU.Build.0 = Debug|Any CPU {5D0136B4-6D21-4F99-AE42-3FB7F478AE0A}.Debug|x86.ActiveCfg = Debug|x86 @@ -468,14 +456,6 @@ Global {7016F080-9AA5-41B2-A225-385AD877C171}.Release|Any CPU.Build.0 = Release|Any CPU {7016F080-9AA5-41B2-A225-385AD877C171}.Release|x86.ActiveCfg = Release|x86 {7016F080-9AA5-41B2-A225-385AD877C171}.Release|x86.Build.0 = Release|x86 - {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Debug|x86.ActiveCfg = Debug|x86 - {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Debug|x86.Build.0 = Debug|x86 - {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Release|Any CPU.Build.0 = Release|Any CPU - {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Release|x86.ActiveCfg = Release|x86 - {2DA8F505-51BE-48C8-B32B-5E753E936DEC}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE