[+] Possible watcher api

This commit is contained in:
Reece Wilson 2022-04-02 19:15:59 +01:00
parent 24ea76e30e
commit 2b4bb66e0c

View File

@ -0,0 +1,36 @@
/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Watcher.hpp
Date: 2022-4-1
Author: Reece
***/
#pragma once
namespace Aurora::IO::FS
{
struct UserWatchData
{
virtual ~UserWatchData() {};
};
struct WatchedFile
{
AuSPtr<UserWatchData> userData;
AuString path;
};
struct IWatcher
{
virtual bool AddWatch(const WatchedFile &file) = 0;
virtual bool RemoveByName(const AuString &path) = 0;
virtual bool RemoveByPrivateContext(const AuSPtr<UserWatchData> &file) = 0;
virtual AuSPtr<Loop::ILoopSource> AsLoopSource() = 0;
virtual AuList<WatchedFile> QueryUpdates() = 0;
};
AUKN_SHARED_API(NewWatcher, IWatcher);
}