Shaka Player Embedded
version_change_event.cc
Go to the documentation of this file.
1 // Copyright 2019 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 
16 
17 namespace shaka {
18 namespace js {
19 namespace events {
20 
21 DEFINE_STRUCT_SPECIAL_METHODS_COPYABLE(IDBVersionChangeEventInit);
22 
24  uint64_t old_version,
25  optional<uint64_t> new_version)
26  : IDBVersionChangeEvent(to_string(event_type), old_version, new_version) {}
27 
28 // \cond Doxygen_Skip
29 IDBVersionChangeEvent::~IDBVersionChangeEvent() {}
30 // \endcond Doxygen_Skip
31 
32 
33 IDBVersionChangeEvent::IDBVersionChangeEvent(const std::string& event_type,
34  uint64_t old_version,
36  : Event(event_type), old_version(old_version), new_version(new_version) {}
37 
39  AddReadOnlyProperty("oldVersion", &IDBVersionChangeEvent::old_version);
40  AddReadOnlyProperty("newVersion", &IDBVersionChangeEvent::new_version);
41 }
42 
43 } // namespace events
44 } // namespace js
45 } // namespace shaka
IDBVersionChangeEvent(EventType event_type, uint64_t old_version, optional< uint64_t > new_version)
std::string to_string(VideoReadyState state)
Definition: media_player.cc:32
DEFINE_STRUCT_SPECIAL_METHODS_COPYABLE(IDBVersionChangeEventInit)
Event(const std::string &type)
Definition: event.cc:28