Shaka Player Embedded
|
#include <transaction.h>
Public Member Functions | |
IDBTransaction (RefPtr< IDBDatabase > db, IDBTransactionMode mode, const std::vector< std::string > &scope) | |
void | Trace (memory::HeapTracer *tracer) const override |
ExceptionOr< RefPtr< IDBObjectStore > > | ObjectStore (const std::string name) |
ExceptionOr< void > | Abort () |
RefPtr< IDBRequest > | AddRequest (RefPtr< IDBRequest > request) |
void | DoCommit (SqliteConnection *connection) |
void | DoCommit (SqliteTransaction *transaction) |
void | AddObjectStore (const std::string &name) |
void | DeleteObjectStore (const std::string &name) |
![]() | |
EventTarget () | |
void | AddEventListener (const std::string &type, Listener callback) |
void | SetCppEventListener (EventType type, std::function< void()> callback) |
void | RemoveEventListener (const std::string &type, Listener callback) |
void | UnsetCppEventListener (EventType type) |
ExceptionOr< bool > | DispatchEvent (RefPtr< Event > event) |
ExceptionOr< bool > | DispatchEventInternal (RefPtr< Event > event, bool *did_listeners_throw) |
template<typename EventType , typename... Args> | |
std::shared_ptr< ThreadEvent< bool > > | ScheduleEvent (Args &&... args) |
template<typename EventType , typename... Args> | |
ExceptionOr< bool > | RaiseEvent (Args... args) |
![]() | |
BackingObject () | |
void | Trace (memory::HeapTracer *tracer) const override |
bool | IsRootedAlive () const override |
std::string | name () const |
virtual BackingObjectFactoryBase * | factory () const =0 |
bool | DerivedFrom (const std::string &base) |
ReturnVal< JsValue > | JsThis () const |
void | SetJsThis (Handle< JsObject > this_) |
![]() | |
virtual | ~Traceable () |
virtual bool | IsShortLived () const |
Public Attributes | |
Listener | on_abort |
Listener | on_complete |
Listener | on_error |
const Member< IDBDatabase > | db |
Member< dom::DOMException > | error |
const IDBTransactionMode | mode |
bool | aborted |
bool | active |
bool | done |
SqliteTransaction * | sqlite_transaction |
Additional Inherited Members | |
![]() | |
using | Listener = optional< Callback > |
![]() | |
static void * | operator new[] (size_t size)=delete |
static void | operator delete[] (void *)=delete |
![]() | |
static constexpr const size_t | kInternalFieldCount = 2 |
![]() | |
static constexpr const uint64_t | kShortLiveDurationMs = 5000 |
![]() | |
void | AddListenerField (EventType type, Listener *on_field) |
![]() | |
~BackingObject () override | |
Definition at line 50 of file transaction.h.
shaka::js::idb::IDBTransaction::IDBTransaction | ( | RefPtr< IDBDatabase > | db, |
IDBTransactionMode | mode, | ||
const std::vector< std::string > & | scope | ||
) |
Definition at line 29 of file transaction.cc.
ExceptionOr< void > shaka::js::idb::IDBTransaction::Abort | ( | ) |
Definition at line 76 of file transaction.cc.
void shaka::js::idb::IDBTransaction::AddObjectStore | ( | const std::string & | name | ) |
Definition at line 137 of file transaction.cc.
RefPtr< IDBRequest > shaka::js::idb::IDBTransaction::AddRequest | ( | RefPtr< IDBRequest > | request | ) |
Definition at line 86 of file transaction.cc.
void shaka::js::idb::IDBTransaction::DeleteObjectStore | ( | const std::string & | name | ) |
Definition at line 142 of file transaction.cc.
void shaka::js::idb::IDBTransaction::DoCommit | ( | SqliteConnection * | connection | ) |
Not to be confused with the JavaScript commit() method, this synchronously runs all the pending requests and executes the transaction in the given sqlite connection.
Definition at line 91 of file transaction.cc.
void shaka::js::idb::IDBTransaction::DoCommit | ( | SqliteTransaction * | transaction | ) |
Definition at line 106 of file transaction.cc.
ExceptionOr< RefPtr< IDBObjectStore > > shaka::js::idb::IDBTransaction::ObjectStore | ( | const std::string | name | ) |
Definition at line 60 of file transaction.cc.
|
overridevirtual |
Called during a GC run. This should call HeapTracer::Trace on all Traceable members. Be sure to call the base method when overriding.
Reimplemented from shaka::js::events::EventTarget.
Definition at line 51 of file transaction.cc.
bool shaka::js::idb::IDBTransaction::aborted |
Definition at line 82 of file transaction.h.
bool shaka::js::idb::IDBTransaction::active |
Definition at line 83 of file transaction.h.
const Member<IDBDatabase> shaka::js::idb::IDBTransaction::db |
Definition at line 79 of file transaction.h.
bool shaka::js::idb::IDBTransaction::done |
Definition at line 84 of file transaction.h.
Member<dom::DOMException> shaka::js::idb::IDBTransaction::error |
Definition at line 80 of file transaction.h.
const IDBTransactionMode shaka::js::idb::IDBTransaction::mode |
Definition at line 81 of file transaction.h.
Listener shaka::js::idb::IDBTransaction::on_abort |
Definition at line 75 of file transaction.h.
Listener shaka::js::idb::IDBTransaction::on_complete |
Definition at line 76 of file transaction.h.
Listener shaka::js::idb::IDBTransaction::on_error |
Definition at line 77 of file transaction.h.
SqliteTransaction* shaka::js::idb::IDBTransaction::sqlite_transaction |
Definition at line 88 of file transaction.h.