diff --git a/src/Moryx.AbstractionLayer/Drivers/Camera/ICameraDriver.cs b/src/Moryx.AbstractionLayer/Drivers/Camera/ICameraDriver.cs index 3c4dd565..9d287dc7 100644 --- a/src/Moryx.AbstractionLayer/Drivers/Camera/ICameraDriver.cs +++ b/src/Moryx.AbstractionLayer/Drivers/Camera/ICameraDriver.cs @@ -1,4 +1,5 @@ using Moryx.AbstractionLayer.Drivers; +using System; using System.Threading.Tasks; namespace Moryx.Drivers.Camera.Interfaces @@ -9,15 +10,9 @@ namespace Moryx.Drivers.Camera.Interfaces public interface ICameraDriver : IDriver where TImage : class { /// - /// Registers an ICameraDriverListener that should be provided - /// with images. + /// Eventhandler to continously provide images from a camera /// - void Register(ICameraDriverListener listener); - - /// - /// Unregisters an ICameraDriverListener - /// - void Unregister(ICameraDriverListener listener); + event EventHandler CapturedImage; /// /// Capture a single image from the camera diff --git a/src/Moryx.AbstractionLayer/Drivers/Camera/ICameraDriverListener.cs b/src/Moryx.AbstractionLayer/Drivers/Camera/ICameraDriverListener.cs deleted file mode 100644 index da7a7fe3..00000000 --- a/src/Moryx.AbstractionLayer/Drivers/Camera/ICameraDriverListener.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Moryx.AbstractionLayer.Drivers; -using System.Threading.Tasks; - -namespace Moryx.Drivers.Camera.Interfaces -{ - /// - /// Interface for objects that register as listeners to camera drivers - /// - public interface ICameraDriverListener where T : class - { - /// - /// Invoked, when a new image is received by the camera - /// - /// - /// - Task OnImage(T image); - } -}