Chromium Code Reviews| Index: services/media/framework/metadata.h |
| diff --git a/services/media/framework/metadata.h b/services/media/framework/metadata.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4e5403edefddc9a111cb039aa7addb056e14ab5a |
| --- /dev/null |
| +++ b/services/media/framework/metadata.h |
| @@ -0,0 +1,79 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef SERVICES_MEDIA_FRAMEWORK_METADATA_H_ |
| +#define SERVICES_MEDIA_FRAMEWORK_METADATA_H_ |
| + |
| +#include <memory> |
| + |
| +#include "services/media/framework/ptr.h" |
| + |
| +namespace mojo { |
| +namespace media { |
| + |
| +class Metadata; |
| + |
| +typedef UniquePtr<Metadata> MetadataPtr; |
| + |
| +class Metadata { |
|
johngro
2016/01/26 01:32:38
As a top level design thing, this class seems to b
dalesat
2016/01/26 21:17:51
Acknowledged.
|
| + public: |
| + static MetadataPtr New( |
| + uint64_t duration_ns, |
| + const std::string& title, |
| + const std::string& artist, |
| + const std::string& album, |
| + const std::string& publisher, |
| + const std::string& genre, |
| + const std::string& composer); |
| + |
| + Metadata( |
|
johngro
2016/01/26 01:32:38
If the intention here is to make this class the ty
dalesat
2016/01/26 21:17:51
Done.
|
| + uint64_t duration_ns, |
| + const std::string& title, |
| + const std::string& artist, |
| + const std::string& album, |
| + const std::string& publisher, |
| + const std::string& genre, |
| + const std::string& composer); |
| + |
| + ~Metadata(); |
| + |
| + uint64_t duration_ns() const { return duration_ns_; } |
| + |
| + const std::string& title() const { return title_; } |
| + |
| + const std::string& artist() const { return artist_; } |
| + |
| + const std::string& album() const { return album_; } |
| + |
| + const std::string& publisher() const { return publisher_; } |
| + |
| + const std::string& genre() const { return genre_; } |
| + |
| + const std::string& composer() const { return composer_; } |
| + |
| + MetadataPtr Clone() const { |
| + return New( |
| + duration_ns_, |
| + title_, |
| + artist_, |
| + album_, |
| + publisher_, |
| + genre_, |
| + composer_); |
| + } |
| + |
| + private: |
| + uint64_t duration_ns_; |
| + std::string title_; |
| + std::string artist_; |
| + std::string album_; |
| + std::string publisher_; |
| + std::string genre_; |
| + std::string composer_; |
| +}; |
| + |
| +} // namespace media |
| +} // namespace mojo |
| + |
| +#endif // SERVICES_MEDIA_FRAMEWORK_METADATA_H_ |