| 13 | using namespace platform; |
| 14 | |
| 15 | AsyncIndexDBOperation::AsyncIndexDBOperation(const std::string &full_name, O_handler o_handler) : o_handler(o_handler) { |
| 16 | // std::cout << "AsyncIndexDBOperation open " << full_name << std::endl; |
| 17 | emscripten_fetch_attr_t attr; |
| 18 | emscripten_fetch_attr_init(&attr); |
| 19 | strcpy(attr.requestMethod, "GET"); |
| 20 | attr.attributes = EMSCRIPTEN_FETCH_NO_DOWNLOAD | EMSCRIPTEN_FETCH_LOAD_TO_MEMORY; |
| 21 | attr.userData = this; |
| 22 | attr.onsuccess = static_success; |
| 23 | attr.onerror = static_failed; |
| 24 | fetch = emscripten_fetch(&attr, full_name.c_str()); |
| 25 | } |
| 26 | |
| 27 | // Save |
| 28 | AsyncIndexDBOperation::AsyncIndexDBOperation( |
nothing calls this directly
no outgoing calls
no test coverage detected