diff options
author | sr55 <[email protected]> | 2012-08-19 16:43:13 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-08-19 16:43:13 +0000 |
commit | 4934b148e573ceffad62cbb2e8c09c95a0fe61b3 (patch) | |
tree | 5b07f3e8fa74b7f83573746cfe77a9f6c6c2b5ee /win/CS/HandBrake.ApplicationServices/Services/Interfaces | |
parent | 5ea4bd4112519332f1f420d4fd751bc8829e0509 (diff) |
WinGui: Prototype of process isolation support (to be used for libhb when this is fixed up). Uses WCF for process communication.
Initially for the scan service only, encode service proxy coming soon.
No changes required for the UI application. Two new implementations of IScan and IEncode will act as a proxy between the UI and the Server Service Layer.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4911 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Interfaces')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Interfaces/IHbServiceCallback.cs | 46 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Interfaces/IServerService.cs | 93 |
2 files changed, 139 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IHbServiceCallback.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IHbServiceCallback.cs new file mode 100644 index 000000000..afb7ca5c3 --- /dev/null +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IHbServiceCallback.cs @@ -0,0 +1,46 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IHbServiceCallback.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>
+// HandBrake WCF Service Callbacks
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.ApplicationServices.Services.Interfaces
+{
+ using System.ServiceModel;
+
+ using HandBrake.ApplicationServices.EventArgs;
+
+ /// <summary>
+ /// HandBrake WCF Service Callbacks
+ /// </summary>
+ [ServiceContract]
+ public interface IHbServiceCallback
+ {
+ /// <summary>
+ /// The scan progress.
+ /// </summary>
+ /// <param name="eventArgs">
+ /// The event args.
+ /// </param>
+ [OperationContract(IsOneWay = true)]
+ void ScanProgressCallback(ScanProgressEventArgs eventArgs);
+
+ /// <summary>
+ /// The scan completed.
+ /// </summary>
+ /// <param name="eventArgs">
+ /// The event args.
+ /// </param>
+ [OperationContract(IsOneWay = true)]
+ void ScanCompletedCallback(ScanCompletedEventArgs eventArgs);
+
+ /// <summary>
+ /// The scan started callback.
+ /// </summary>
+ [OperationContract(IsOneWay = true)]
+ void ScanStartedCallback();
+ }
+}
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IServerService.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IServerService.cs new file mode 100644 index 000000000..22156e6fc --- /dev/null +++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IServerService.cs @@ -0,0 +1,93 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IServerService.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>
+// Defines the IServerService type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.ApplicationServices.Services.Interfaces
+{
+ using System.Runtime.Serialization;
+ using System.ServiceModel;
+
+ using HandBrake.ApplicationServices.Parsing;
+
+ /// <summary>
+ /// The HandBrakeService interface.
+ /// </summary>
+ [ServiceContract(CallbackContract = typeof(IHbServiceCallback), SessionMode = SessionMode.Required)]
+ public interface IServerService
+ {
+ /// <summary>
+ /// Gets the activity log.
+ /// </summary>
+ [DataMember]
+ string ActivityLog { get; }
+
+ /// <summary>
+ /// Gets the souce data.
+ /// </summary>
+ Source SouceData
+ {
+ [OperationContract]
+ get;
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether is scanning.
+ /// </summary>
+ [DataMember]
+ bool IsScanning { get; }
+
+ /// <summary>
+ /// Start the WCF Service
+ /// </summary>
+ void Start();
+
+ /// <summary>
+ /// Stop the WCF Service
+ /// </summary>
+ void Stop();
+
+ /// <summary>
+ /// The scan source.
+ /// </summary>
+ /// <param name="path">
+ /// The path.
+ /// </param>
+ /// <param name="title">
+ /// The title.
+ /// </param>
+ /// <param name="previewCount">
+ /// The preview Count.
+ /// </param>
+ [OperationContract]
+ void ScanSource(string path, int title, int previewCount);
+
+ /// <summary>
+ /// Stop the scan.
+ /// </summary>
+ [OperationContract]
+ void StopScan();
+
+ /// <summary>
+ /// Subscribe for callbacks from the called functions
+ /// </summary>
+ /// <returns>
+ /// The System.Boolean.
+ /// </returns>
+ [OperationContract]
+ bool Subscribe();
+
+ /// <summary>
+ /// Unsubscribe from callbacks.
+ /// </summary>
+ /// <returns>
+ /// The System.Boolean.
+ /// </returns>
+ [OperationContract]
+ bool Unsubscribe();
+ }
+}
\ No newline at end of file |