|
Shaka Player Embedded
|
#include <eme_promise.h>
Classes | |
| class | Impl |
Public Member Functions | |
| EmePromise () | |
| EmePromise (const EmePromise &other) | |
| EmePromise (EmePromise &&other) | |
| ~EmePromise () | |
| EmePromise & | operator= (const EmePromise &other) |
| EmePromise & | operator= (EmePromise &&other) |
| bool | valid () const |
| void | Resolve () |
| void | ResolveWith (bool value) |
| void | Reject (ExceptionType except_type, const std::string &message) |
Friends | |
| class | ClearKeyImplementationTest |
| class | js::eme::MediaKeys |
| class | js::eme::MediaKeySession |
Defines a wrapper around a JavaScript Promise object.
EME APIs are always given valid Promise objects; but if you use the default constructor or use std::move(), it will create an invalid Promise object. You can't call any methods on an invalid object except for valid().
This type is not thread-safe.
Definition at line 47 of file eme_promise.h.
| shaka::eme::EmePromise::EmePromise | ( | ) |
Creates an invalid Promise object. The members of this object can't be used unless a valid Promise is moved/copied into this.
Definition at line 119 of file eme_promise.cc.
|
default |
|
default |
| shaka::eme::EmePromise::~EmePromise | ( | ) |
Definition at line 125 of file eme_promise.cc.
|
default |
|
default |
| void shaka::eme::EmePromise::Reject | ( | ExceptionType | except_type, |
| const std::string & | message | ||
| ) |
Rejects the Promise with the given error. If the Promise has already been resolved/rejected, this call is ignored.
Definition at line 142 of file eme_promise.cc.
| void shaka::eme::EmePromise::Resolve | ( | ) |
Resolves the Promise. If the Promise has already been resolved/rejected, this call is ignored.
Definition at line 134 of file eme_promise.cc.
| void shaka::eme::EmePromise::ResolveWith | ( | bool | value | ) |
Resolves the Promise with the given value. If the Promise has already been resolved/rejected, this call is ignored.
Definition at line 138 of file eme_promise.cc.
| bool shaka::eme::EmePromise::valid | ( | ) | const |
Definition at line 130 of file eme_promise.cc.
|
friend |
Definition at line 84 of file eme_promise.h.
|
friend |
Definition at line 87 of file eme_promise.h.
|
friend |
Definition at line 88 of file eme_promise.h.
1.8.13