OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace media_router { | 10 namespace media_router { |
11 | 11 |
12 // Represents a sink to which media can be routed. | 12 // Represents a sink to which media can be routed. |
13 class MediaSink { | 13 class MediaSink { |
14 public: | 14 public: |
15 using Id = std::string; | 15 using Id = std::string; |
16 | 16 |
17 enum IconType { | 17 enum IconType { |
18 CAST, | 18 CAST, |
19 CAST_AUDIO, | 19 CAST_AUDIO, |
20 CAST_AUDIO_GROUP, | 20 CAST_AUDIO_GROUP, |
21 GENERIC, | 21 GENERIC, |
22 HANGOUT | 22 HANGOUT |
23 }; | 23 }; |
24 | 24 |
25 MediaSink(const MediaSink::Id& sink_id, | 25 MediaSink(const MediaSink::Id& sink_id, |
26 const std::string& name, | 26 const std::string& name, |
27 const IconType icon_type); | 27 const IconType icon_type); |
28 | 28 |
| 29 MediaSink(const MediaSink& other); |
| 30 |
29 ~MediaSink(); | 31 ~MediaSink(); |
30 | 32 |
31 const MediaSink::Id& id() const { return sink_id_; } | 33 const MediaSink::Id& id() const { return sink_id_; } |
32 const std::string& name() const { return name_; } | 34 const std::string& name() const { return name_; } |
33 void set_description(const std::string& description) { | 35 void set_description(const std::string& description) { |
34 description_ = description; | 36 description_ = description; |
35 } | 37 } |
36 const std::string& description() const { return description_; } | 38 const std::string& description() const { return description_; } |
37 void set_domain(const std::string& domain) { | 39 void set_domain(const std::string& domain) { |
38 domain_ = domain; | 40 domain_ = domain; |
(...skipping 16 matching lines...) Expand all Loading... |
55 // Optional domain of the MediaSink. | 57 // Optional domain of the MediaSink. |
56 std::string domain_; | 58 std::string domain_; |
57 | 59 |
58 // The type of icon that corresponds with the MediaSink. | 60 // The type of icon that corresponds with the MediaSink. |
59 IconType icon_type_; | 61 IconType icon_type_; |
60 }; | 62 }; |
61 | 63 |
62 } // namespace media_router | 64 } // namespace media_router |
63 | 65 |
64 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ | 66 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_ |
OLD | NEW |