Shaka Player Embedded
offline_externs.cc
Go to the documentation of this file.
1 // Copyright 2020 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 // AUTO-GENERATED: DO NOT EDIT
16 
17 #include "shaka/offline_externs.h"
18 
19 #include "src/js/offline_externs.h"
20 
21 namespace shaka {
22 
24  public:
26  const std::string originalManifestUri{};
27  const double duration{};
28  const double size{};
29  const double expiration{};
30  const std::unordered_map<std::string, std::string> appMetadata{};
31 
32  Impl() {}
33  Impl(js::StoredContent&& internal)
36  duration(std::move(internal.duration)),
37  size(std::move(internal.size)),
39  appMetadata(std::make_move_iterator(internal.appMetadata.begin()), std::make_move_iterator(internal.appMetadata.end())) {}
40 };
41 
43 StoredContent::StoredContent(js::StoredContent&& internal) : impl_(new Impl{std::move(internal)}) {}
47 
50 
52  return impl_->offlineUri;
53 }
54 
55 const std::string& StoredContent::original_manifest_uri() const {
56  return impl_->originalManifestUri;
57 }
58 
59 double StoredContent::duration() const {
60  return impl_->duration;
61 }
62 
63 double StoredContent::size() const {
64  return impl_->size;
65 }
66 
67 double StoredContent::expiration() const {
68  return impl_->expiration;
69 }
70 
71 const std::unordered_map<std::string, std::string>& StoredContent::app_metadata() const {
72  return impl_->appMetadata;
73 }
74 
75 
78  ret.offlineUri = impl_->offlineUri;
79  ret.originalManifestUri = impl_->originalManifestUri;
80  ret.duration = impl_->duration;
81  ret.size = impl_->size;
82  ret.expiration = impl_->expiration;
83  ret.appMetadata = impl_->appMetadata;
84  return ret;
85 }
86 
87 
88 
89 } // namespace shaka
Impl(js::StoredContent &&internal)
js::StoredContent GetInternal() const
const std::string originalManifestUri
const std::unordered_map< std::string, std::string > appMetadata
StoredContent & operator=(const StoredContent &)
const std::string & original_manifest_uri() const
double expiration() const
const std::unordered_map< std::string, std::string > & app_metadata() const
shaka::optional< std::string > offline_uri() const
double duration() const
const shaka::optional< std::string > offlineUri