diff options
Diffstat (limited to 'win/CS/HandBrake.Interop/Interop/Providers')
-rw-r--r-- | win/CS/HandBrake.Interop/Interop/Providers/HbFunctionsProvider.cs | 30 | ||||
-rw-r--r-- | win/CS/HandBrake.Interop/Interop/Providers/Interfaces/IHbFunctionsProvider.cs | 18 |
2 files changed, 48 insertions, 0 deletions
diff --git a/win/CS/HandBrake.Interop/Interop/Providers/HbFunctionsProvider.cs b/win/CS/HandBrake.Interop/Interop/Providers/HbFunctionsProvider.cs new file mode 100644 index 000000000..3b964ff8c --- /dev/null +++ b/win/CS/HandBrake.Interop/Interop/Providers/HbFunctionsProvider.cs @@ -0,0 +1,30 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="HbFunctionsProvider.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// Provides an instance of IHbFunctions for use by the GUI. +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrake.Interop.Interop.Providers +{ + using HandBrake.Interop.Interop.HbLib.Wrappers; + using HandBrake.Interop.Interop.HbLib.Wrappers.Interfaces; + using HandBrake.Interop.Interop.Providers.Interfaces; + + public class HbFunctionsProvider : IHbFunctionsProvider + { + private static IHbFunctions hbFunctions; + + public IHbFunctions GetHbFunctionsWrapper() + { + if (hbFunctions == null) + { + hbFunctions = new HbFunctionsDirect(); + } + + return hbFunctions; + } + } +} diff --git a/win/CS/HandBrake.Interop/Interop/Providers/Interfaces/IHbFunctionsProvider.cs b/win/CS/HandBrake.Interop/Interop/Providers/Interfaces/IHbFunctionsProvider.cs new file mode 100644 index 000000000..f64f54594 --- /dev/null +++ b/win/CS/HandBrake.Interop/Interop/Providers/Interfaces/IHbFunctionsProvider.cs @@ -0,0 +1,18 @@ +// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="IHbFunctionsProvider.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// Provides an instance of IHbFunctions for use by the GUI. +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrake.Interop.Interop.Providers.Interfaces +{ + using HandBrake.Interop.Interop.HbLib.Wrappers.Interfaces; + + public interface IHbFunctionsProvider + { + IHbFunctions GetHbFunctionsWrapper(); + } +}
\ No newline at end of file |