diff options
author | sr55 <[email protected]> | 2019-09-22 17:09:04 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-09-22 17:09:21 +0100 |
commit | 9552988c29ec0fff026528bb6501635783f5c22f (patch) | |
tree | 5c2eefeae4bd6fc5d04ff029b566a8ebbcee7cbc /win/CS/HandBrake.Interop/Interop/Providers/HbFunctionsProvider.cs | |
parent | 63c732376f959699e0d199232dae8a08846f3595 (diff) |
WinGui:
- Add a non-static wrapper around HbFunctions.cs
- Add a Wrapper Provider that for now, returns only a direct in-process wrapper instance for libhb HbFunctions calls.
- Update all calls to use the new non-static wrapper provider / interface
Diffstat (limited to 'win/CS/HandBrake.Interop/Interop/Providers/HbFunctionsProvider.cs')
-rw-r--r-- | win/CS/HandBrake.Interop/Interop/Providers/HbFunctionsProvider.cs | 30 |
1 files changed, 30 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; + } + } +} |