using System;\r
using System.ComponentModel;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
+ using HandBrake.ApplicationServices.Utilities;\r
\r
/// <summary>\r
/// Enum to Description Converter\r
<Compile Include="EventArgs\ScanCompletedEventArgs.cs" />\r
<Compile Include="EventArgs\ScanProgressEventArgs.cs" />\r
<Compile Include="Extensions\StringExtensions.cs" />\r
- <Compile Include="Functions\Converters.cs" />\r
- <Compile Include="Functions\EnumHelper.cs" />\r
- <Compile Include="Functions\GrowlCommunicator.cs" />\r
- <Compile Include="Functions\InteropModelCreator.cs" />\r
- <Compile Include="Functions\PlistHelper.cs" />\r
- <Compile Include="Functions\SystemInfo.cs" />\r
- <Compile Include="Functions\Win32.cs" />\r
- <Compile Include="Functions\Win7.cs" />\r
+ <Compile Include="Utilities\Converters.cs" />\r
+ <Compile Include="Utilities\EnumHelper.cs" />\r
+ <Compile Include="Utilities\GrowlCommunicator.cs" />\r
+ <Compile Include="Utilities\InteropModelCreator.cs" />\r
+ <Compile Include="Utilities\PlistHelper.cs" />\r
+ <Compile Include="Utilities\SystemInfo.cs" />\r
+ <Compile Include="Utilities\Win32.cs" />\r
+ <Compile Include="Utilities\Win7.cs" />\r
<Compile Include="Model\DriveInformation.cs" />\r
<Compile Include="Model\Encoding\AllowedPassthru.cs" />\r
<Compile Include="Model\Encoding\AudioTrack.cs" />\r
<DesignTime>True</DesignTime>\r
<DependentUpon>Resources.resx</DependentUpon>\r
</Compile>\r
- <Compile Include="ServiceManager.cs" />\r
<Compile Include="ServicesWindsorInstaller.cs" />\r
<Compile Include="Services\Base\EncodeBase.cs" />\r
<Compile Include="Services\Encode.cs" />\r
\r
using Caliburn.Micro;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Parsing;\r
+ using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop.Model.Encoding;\r
\r
/// <summary>\r
using System.IO;\r
using System.Text.RegularExpressions;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
+ using HandBrake.ApplicationServices.Utilities;\r
\r
/// <summary>\r
/// An object that represents a subtitle associated with a Title, in a DVD\r
using System.Linq;\r
using System.Text.RegularExpressions;\r
\r
+ using Caliburn.Micro;\r
+\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.Interop.Model;\r
\r
/// <summary>\r
/// The User Setting Service\r
/// </summary>\r
- private static IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+ private static IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
\r
/// <summary>\r
/// Initializes a new instance of the <see cref="Title"/> class. \r
+++ /dev/null
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="ServiceManager.cs" company="HandBrake Project (http://handbrake.fr)">\r
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-// Tempory Class which manages services until Windosor is added back into the project to handle it for us.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices\r
-{\r
- using Caliburn.Micro;\r
-\r
- using HandBrake.ApplicationServices.Services.Interfaces;\r
- using HandBrake.Interop;\r
-\r
- /// <summary>\r
- /// Tempory Class which manages services until Windosor is added back into the project to handle it for us.\r
- /// </summary>\r
- public class ServiceManager\r
- {\r
- /// <summary>\r
- /// The Backing field for HandBrake Instance.\r
- /// </summary>\r
- private static HandBrakeInstance handBrakeInstance;\r
-\r
- /// <summary>\r
- /// Gets UserSettingService.\r
- /// </summary>\r
- public static IUserSettingService UserSettingService\r
- {\r
- get\r
- {\r
- return IoC.Get<IUserSettingService>();\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Gets HandBrakeInstance.\r
- /// </summary>\r
- public static HandBrakeInstance HandBrakeInstance\r
- {\r
- get\r
- {\r
- return handBrakeInstance ?? (handBrakeInstance = new HandBrakeInstance());\r
- }\r
- }\r
- }\r
-}\r
using System.IO;\r
using System.Text;\r
\r
+ using Caliburn.Micro;\r
+\r
using HandBrake.ApplicationServices.EventArgs;\r
using HandBrake.ApplicationServices.Exceptions;\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.ApplicationServices.Utilities;\r
/// <summary>\r
/// The User Setting Service\r
/// </summary>\r
- private IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+ private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
\r
/// <summary>\r
/// Windows 7 API Pack wrapper\r
using System.Threading;\r
using System.Windows.Forms;\r
\r
+ using Caliburn.Micro;\r
+\r
using HandBrake.ApplicationServices.EventArgs;\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
- using HandBrake.ApplicationServices.Parsing;\r
using HandBrake.ApplicationServices.Services.Base;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.ApplicationServices.Utilities;\r
\r
+ using Parser = HandBrake.ApplicationServices.Parsing.Parser;\r
+\r
/// <summary>\r
/// Class which handles the CLI\r
/// </summary>\r
/// <summary>\r
/// The User Setting Service\r
/// </summary>\r
- private IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+ private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
\r
/// <summary>\r
/// Gets The Process Handle\r
using System;\r
using System.Diagnostics;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
+ using Caliburn.Micro;\r
+\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services.Base;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
+ using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop;\r
+ using HandBrake.Interop.Interfaces;\r
using HandBrake.Interop.Model;\r
\r
using EncodeCompletedEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs;\r
/// <summary>\r
/// The User Setting Service\r
/// </summary>\r
- private IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+ private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
\r
/// <summary>\r
/// The Start time of the current Encode;\r
/// <summary>\r
/// An Instance of the HandBrake Interop Library\r
/// </summary>\r
- private HandBrakeInstance instance;\r
+ private IHandBrakeInstance instance;\r
\r
/// <summary>\r
/// A flag to indicate if logging is enabled or not.\r
public LibEncode()\r
{\r
// Setup the HandBrake Instance\r
- this.instance = ServiceManager.HandBrakeInstance;\r
+ this.instance = IoC.Get<IHandBrakeInstance>();\r
this.instance.EncodeCompleted += this.InstanceEncodeCompleted;\r
this.instance.EncodeProgress += this.InstanceEncodeProgress;\r
\r
using System.Text;\r
using System.Threading;\r
\r
+ using Caliburn.Micro;\r
+\r
using HandBrake.ApplicationServices.EventArgs;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
using HandBrake.ApplicationServices.Parsing;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop;\r
+ using HandBrake.Interop.Interfaces;\r
\r
using AudioTrack = HandBrake.ApplicationServices.Parsing.Audio;\r
using ScanProgressEventArgs = HandBrake.Interop.ScanProgressEventArgs;\r
/// <summary>\r
/// LibHB Instance\r
/// </summary>\r
- private readonly HandBrakeInstance instance;\r
+ private readonly IHandBrakeInstance instance;\r
\r
/// <summary>\r
/// Log data from HandBrakeInstance\r
{\r
logging = new StringBuilder();\r
\r
- instance = ServiceManager.HandBrakeInstance;\r
+ instance = IoC.Get<IHandBrakeInstance>();\r
instance.Initialize(1);\r
instance.ScanProgress += this.InstanceScanProgress;\r
instance.ScanCompleted += this.InstanceScanCompleted;\r
using System.Text.RegularExpressions;\r
using System.Xml.Serialization;\r
\r
+ using Caliburn.Micro;\r
+\r
using HandBrake.ApplicationServices.Exceptions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
/// <summary>\r
/// The User Setting Service\r
/// </summary>\r
- private IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+ private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
\r
#endregion\r
\r
using Caliburn.Micro;\r
\r
using HandBrake.ApplicationServices.EventArgs;\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
+ using HandBrake.ApplicationServices.Utilities;\r
\r
/// <summary>\r
/// The HandBrake Queue\r
using System.Threading;\r
using System.Windows.Forms;\r
\r
+ using Caliburn.Micro;\r
+\r
using HandBrake.ApplicationServices.EventArgs;\r
using HandBrake.ApplicationServices.Exceptions;\r
using HandBrake.ApplicationServices.Parsing;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.ApplicationServices.Utilities;\r
\r
+ using Parser = HandBrake.ApplicationServices.Parsing.Parser;\r
+\r
/// <summary>\r
/// Scan a Source\r
/// </summary>\r
/// <summary>\r
/// The User Setting Service\r
/// </summary>\r
- private IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+ private IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
\r
#endregion\r
\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
{\r
using System;\r
using System.Text.RegularExpressions;\r
\r
+ using HandBrake.ApplicationServices.Model.Encoding;\r
using HandBrake.Interop.Model.Encoding;\r
using HandBrake.Interop.Model.Encoding.x264;\r
\r
- using OutputFormat = HandBrake.ApplicationServices.Model.Encoding.OutputFormat;\r
-\r
/// <summary>\r
/// A class to convert various things to native C# objects\r
/// </summary>\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
{\r
using System;\r
using System.Collections.Generic;\r
\r
using Caliburn.Micro;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
{\r
using System;\r
\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
{\r
using System;\r
using System.Collections.Generic;\r
using HandBrake.Interop.Model;\r
using HandBrake.Interop.Model.Encoding;\r
\r
- using OutputFormat = HandBrake.ApplicationServices.Model.Encoding.OutputFormat;\r
-\r
/// <summary>\r
/// A Utility Class to Convert a \r
/// </summary>\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
{\r
using System;\r
using System.Collections.Generic;\r
using System.Windows.Forms;\r
using System.Xml;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
+ using Caliburn.Micro;\r
+\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
using HandBrake.ApplicationServices.Services;\r
/// <summary>\r
/// The User Setting Service\r
/// </summary>\r
- private static IUserSettingService userSettingService = ServiceManager.UserSettingService;\r
+ private static IUserSettingService userSettingService = IoC.Get<IUserSettingService>();\r
\r
#region Import\r
\r
using System.Globalization;\r
using System.IO;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
+ using Caliburn.Micro;\r
+\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
/// <summary>\r
/// Backing field for the user settings service.\r
/// </summary>\r
- private static readonly IUserSettingService UserSettingService = ServiceManager.UserSettingService;\r
+ private static readonly IUserSettingService UserSettingService = IoC.Get<IUserSettingService>();\r
\r
/// <summary>\r
/// Generate a CLI Query for an EncodeTask Model object\r
using System.Linq;\r
using System.Text.RegularExpressions;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
using HandBrake.Interop.Model;\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
{\r
using System.Windows.Forms;\r
\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
{\r
using System;\r
using System.Runtime.InteropServices;\r
/// <summary>\r
/// Execution State\r
/// </summary>\r
- [FlagsAttribute]\r
+ [Flags]\r
public enum EXECUTION_STATE : uint\r
{\r
ES_SYSTEM_REQUIRED = 0x00000001,\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.Functions\r
+namespace HandBrake.ApplicationServices.Utilities\r
{\r
using Microsoft.WindowsAPICodePack.Taskbar;\r
\r
\r
#region Public Methods\r
\r
+ /// <summary>\r
+ /// Initializes this instance.\r
+ /// </summary>\r
+ /// <param name="verbosity">The code for the logging verbosity to use.</param>\r
+ void Initialize(int verbosity);\r
+\r
/// <summary>\r
/// Calculates the video bitrate for the given job and target size.\r
/// </summary>\r
using System.Linq;\r
using System.Windows.Data;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
+ using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop.Model.Encoding;\r
\r
/// <summary>\r
using System.Text;\r
using System.Windows.Data;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
+ using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop.Model.Encoding;\r
\r
/// <summary>\r
using System.Windows.Data;\r
using System;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
+ using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop.Model.Encoding;\r
using HandBrake.Interop.Model.Encoding.x264;\r
\r
using System.Linq;\r
using System.Windows.Data;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
+ using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop.Model.Encoding;\r
\r
/// <summary>\r
\r
using Caliburn.Micro;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
+ using HandBrake.ApplicationServices.Utilities;\r
+\r
using HandBrakeWPF.Services.Interfaces;\r
using HandBrakeWPF.ViewModels.Interfaces;\r
\r
\r
using Caliburn.Micro;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
using HandBrake.ApplicationServices.Parsing;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
+ using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop.Model.Encoding;\r
\r
using HandBrakeWPF.ViewModels.Interfaces;\r
\r
using Caliburn.Micro;\r
\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Parsing;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
+ using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop.Model.Encoding;\r
\r
using HandBrakeWPF.ViewModels.Interfaces;\r
using Caliburn.Micro;\r
\r
using HandBrake.ApplicationServices;\r
- using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
using HandBrake.ApplicationServices.Parsing;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
+ using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop.Model.Encoding;\r
using HandBrake.Interop.Model.Encoding.x264;\r
\r