Shaka Player Embedded
idb_factory.h
Go to the documentation of this file.
1 // Copyright 2016 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef SHAKA_EMBEDDED_JS_IDB_IDB_FACTORY_H_
16 #define SHAKA_EMBEDDED_JS_IDB_IDB_FACTORY_H_
17 
18 #include <string>
19 
20 #include "shaka/optional.h"
21 #include "src/core/ref_ptr.h"
23 #include "src/mapping/any.h"
26 
27 namespace shaka {
28 namespace js {
29 namespace idb {
30 
31 class IDBOpenDBRequest;
32 class IDBRequest;
33 
35  DECLARE_TYPE_INFO(IDBFactory);
36 
37  public:
38  IDBFactory();
39 
40  RefPtr<IDBOpenDBRequest> Open(const std::string& name,
41  optional<uint64_t> version);
43  RefPtr<IDBRequest> DeleteDatabase(const std::string& name);
44 
46 };
47 
49  : public BackingObjectFactory<IDBFactory, events::EventTarget> {
50  public:
52 };
53 
54 } // namespace idb
55 } // namespace js
56 } // namespace shaka
57 
58 #endif // SHAKA_EMBEDDED_JS_IDB_IDB_FACTORY_H_
ExceptionOr< Any > CloneForTesting(Any value)
Definition: idb_factory.cc:71
Definition: any.h:31
RefPtr< IDBOpenDBRequest > Open(const std::string &name, optional< uint64_t > version)
Definition: idb_factory.cc:41
RefPtr< IDBRequest > DeleteDatabase(const std::string &name)
Definition: idb_factory.cc:61
RefPtr< IDBOpenDBRequest > OpenTestDb()
Definition: idb_factory.cc:52
std::string name() const