AuroraRuntime/Source/IO/IOProcessorItem.hpp
Reece Wilson 70418df761 [+] Added extended IO apis
> StartSimpleLSWatchEx
> StartSimpleIOWatchEx
> StartIOWatchEx
[*] Update README
2022-06-28 16:04:07 +01:00

38 lines
952 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOProcessorItem.hpp
Date: 2022-6-6
Author: Reece
***/
#pragma once
namespace Aurora::IO
{
struct IOProcessor;
struct IOProcessorItem : AuLoop::ILoopSourceSubscriberEx, IIOProcessorItem, AuEnableSharedFromThis<IOProcessorItem>
{
IOProcessor *parent;
bool singleshot{};
bool triggered{};
AuSPtr<IIOWaitableItem> item;
AuSPtr<IIOEventListener> listener;
// ILoopSourceSubscriber
bool OnFinished(const AuSPtr<AuLoop::ILoopSource> &source, AuUInt8 pos) override;
void OnTimeout(const AuSPtr<AuLoop::ILoopSource>& source) override;
// IIOProcessorItem
virtual bool StopWatch() override;
virtual bool FailWatch() override;
// IIOProcessorItem::...
void InvokeManualTick() override;
//
void IOAlert(bool force);
};
}