Interface IQRCodeWatcherService
Interface that defines a service used to detect QR codes in the user's environment.
Namespace: Evergine.Framework.XR.QR
Assembly: Evergine.Framework.dll
Syntax
public interface IQRCodeWatcherService
Properties
IsSupported
Gets a value indicating whether QR code detection is supported on the current device.
Declaration
bool IsSupported { get; }
Property Value
Type | Description |
---|---|
bool |
IsWatcherRunning
Gets a value indicating whether the QR codes scanner is running.
Declaration
bool IsWatcherRunning { get; }
Property Value
Type | Description |
---|---|
bool |
QRCodes
Gets a sequence containing all detected QR codes.
Declaration
IEnumerable<QRCode> QRCodes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<QRCode> |
Methods
ClearQRCodes()
Removes already detected codes.
Declaration
void ClearQRCodes()
StartQRWatchingAsync(CancellationToken)
Starts tracking QR codes asynchronously. Should not be called if the feature is not supported, check the IsSupported to see if this feature is supported. Raises exceptions E_ACCESSDENIED, E_NOT_VALID_STATE, ERROR_NOT_SUPPORTED.
Declaration
Task StartQRWatchingAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | A cancellation token that can be used to cancel the work. |
Returns
Type | Description |
---|---|
Task | A task that represents the start tracking asynchronous operation. |
StopQRWatchingAsync()
Stops the QR codes watcher asynchronously.
Declaration
Task StopQRWatchingAsync()
Returns
Type | Description |
---|---|
Task | A task that represents the stop tracking asynchronous operation. |
Events
IsWatcherRunningChanged
Occurs when the value of IsWatcherRunning is changed.
Declaration
event EventHandler IsWatcherRunningChanged
Event Type
Type | Description |
---|---|
EventHandler |
QRCodeAdded
Event representing the addition of a QRCode.
Declaration
event EventHandler<QRCode> QRCodeAdded
Event Type
Type | Description |
---|---|
EventHandler<QRCode> |
QRCodeRemoved
Event representing the update of a QRCode.
Declaration
event EventHandler<QRCode> QRCodeRemoved
Event Type
Type | Description |
---|---|
EventHandler<QRCode> |
QRCodeUpdated
Event representing the removal of a QRCode.
Declaration
event EventHandler<QRCode> QRCodeUpdated
Event Type
Type | Description |
---|---|
EventHandler<QRCode> |