input/RemoteTagScanner: add API documentation
This commit is contained in:
parent
03700ad37c
commit
5f5be823f3
|
@ -24,12 +24,35 @@
|
|||
|
||||
struct Tag;
|
||||
|
||||
/**
|
||||
* Handler for the #RemoteTagScanner result. It will call one of the
|
||||
* methods upon completion. Must be thread-safe.
|
||||
*/
|
||||
class RemoteTagHandler {
|
||||
public:
|
||||
/**
|
||||
* Called on success.
|
||||
*/
|
||||
virtual void OnRemoteTag(Tag &&tag) noexcept = 0;
|
||||
|
||||
/**
|
||||
* Called on error.
|
||||
*/
|
||||
virtual void OnRemoteTagError(std::exception_ptr e) noexcept = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* This class can load tags of a remote file. It is created by
|
||||
* InputPlugin::scan_tags(), and the #RemoteTagHandler will be called
|
||||
* upon completion.
|
||||
*
|
||||
* To start the operation, call Start().
|
||||
*
|
||||
* You can cancel the operation at any time by destructing this
|
||||
* object; after successful cancellation, the handler will not be
|
||||
* invoked, though it cannot be guaranteed that the handler is not
|
||||
* already being called in another thread.
|
||||
*/
|
||||
class RemoteTagScanner {
|
||||
public:
|
||||
virtual ~RemoteTagScanner() noexcept = default;
|
||||
|
|
Loading…
Reference in New Issue