blob: f83a012cfac0c3ed926b522a7b534af0789da71d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
// Copyright 2015 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 CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_
#define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_
#include <string>
namespace media_router {
// Represents a sink to which media can be routed.
class MediaSink {
public:
using Id = std::string;
enum IconType {
CAST,
CAST_AUDIO,
CAST_AUDIO_GROUP,
GENERIC,
HANGOUT
};
MediaSink(const MediaSink::Id& sink_id,
const std::string& name,
const IconType icon_type);
~MediaSink();
const MediaSink::Id& id() const { return sink_id_; }
const std::string& name() const { return name_; }
void set_description(const std::string& description) {
description_ = description;
}
const std::string& description() const { return description_; }
void set_domain(const std::string& domain) {
domain_ = domain;
}
const std::string& domain() const { return domain_; }
IconType icon_type() const { return icon_type_; }
bool Equals(const MediaSink& other) const;
private:
// Unique identifier for the MediaSink.
MediaSink::Id sink_id_;
// Descriptive name of the MediaSink.
std::string name_;
// Optional description of the MediaSink.
std::string description_;
// Optional domain of the MediaSink.
std::string domain_;
// The type of icon that corresponds with the MediaSink.
IconType icon_type_;
};
} // namespace media_router
#endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINK_H_
|