Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SERVICES_MEDIA_FRAMEWORK_METADATA_H_ | |
| 6 #define SERVICES_MEDIA_FRAMEWORK_METADATA_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "services/media/framework/ptr.h" | |
| 11 | |
| 12 namespace mojo { | |
| 13 namespace media { | |
| 14 | |
| 15 class Metadata; | |
| 16 | |
| 17 typedef UniquePtr<Metadata> MetadataPtr; | |
| 18 | |
| 19 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.
| |
| 20 public: | |
| 21 static MetadataPtr New( | |
| 22 uint64_t duration_ns, | |
| 23 const std::string& title, | |
| 24 const std::string& artist, | |
| 25 const std::string& album, | |
| 26 const std::string& publisher, | |
| 27 const std::string& genre, | |
| 28 const std::string& composer); | |
| 29 | |
| 30 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.
| |
| 31 uint64_t duration_ns, | |
| 32 const std::string& title, | |
| 33 const std::string& artist, | |
| 34 const std::string& album, | |
| 35 const std::string& publisher, | |
| 36 const std::string& genre, | |
| 37 const std::string& composer); | |
| 38 | |
| 39 ~Metadata(); | |
| 40 | |
| 41 uint64_t duration_ns() const { return duration_ns_; } | |
| 42 | |
| 43 const std::string& title() const { return title_; } | |
| 44 | |
| 45 const std::string& artist() const { return artist_; } | |
| 46 | |
| 47 const std::string& album() const { return album_; } | |
| 48 | |
| 49 const std::string& publisher() const { return publisher_; } | |
| 50 | |
| 51 const std::string& genre() const { return genre_; } | |
| 52 | |
| 53 const std::string& composer() const { return composer_; } | |
| 54 | |
| 55 MetadataPtr Clone() const { | |
| 56 return New( | |
| 57 duration_ns_, | |
| 58 title_, | |
| 59 artist_, | |
| 60 album_, | |
| 61 publisher_, | |
| 62 genre_, | |
| 63 composer_); | |
| 64 } | |
| 65 | |
| 66 private: | |
| 67 uint64_t duration_ns_; | |
| 68 std::string title_; | |
| 69 std::string artist_; | |
| 70 std::string album_; | |
| 71 std::string publisher_; | |
| 72 std::string genre_; | |
| 73 std::string composer_; | |
| 74 }; | |
| 75 | |
| 76 } // namespace media | |
| 77 } // namespace mojo | |
| 78 | |
| 79 #endif // SERVICES_MEDIA_FRAMEWORK_METADATA_H_ | |
| OLD | NEW |