13 using Type = std::function<void(T&&)>;
18 using Type = std::function<void()>;
48 : _impl(
std::move(impl)){};
86 void done() { _impl = {}; }
89 std::unique_ptr<detail::PromiseImpl<T>> _impl;
The errors reported by the Millicast SDK.
Definition error.h:16
Promise(std::unique_ptr< detail::PromiseImpl< T > > impl)
Definition promise.h:47
Promise(Promise &&)=delete
void done()
Definition promise.h:86
Promise & operator=(const Promise &)=delete
Promise(const Promise &)=delete
Promise & operator=(Promise &&)=delete
Promise< T > & on_result(const typename detail::PromiseResultCbType< T >::Type &cb)
Definition promise.h:61
Promise< T > & on_error(const std::function< void(const Error &)> &cb)
Definition promise.h:73
virtual void on_error(const std::function< void(const Error &)> &cb)=0
virtual ~PromiseImpl()=default
virtual void on_result(const typename detail::PromiseResultCbType< T >::Type &cb)=0
#define MILLICAST_TEMPLATE_API
Definition exports.h:46
Definition capabilities.h:15
std::function< void()> Type
Definition promise.h:18
std::function< void(T &&)> Type
Definition promise.h:13