Commit 5f5be823 authored by Max Kellermann's avatar Max Kellermann

input/RemoteTagScanner: add API documentation

parent 03700ad3
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment