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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SOURCE_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SOURCE_H_
11 #include "base/hash.h"
13 namespace media_router
{
18 using Id
= std::string
;
20 explicit MediaSource(const MediaSource::Id
& id
);
24 // Gets the ID of the media source.
25 MediaSource::Id
id() const;
27 // Returns true if two MediaSource objects use the same media ID.
28 bool Equals(const MediaSource
& other
) const;
30 // Returns true if a MediaSource is empty or uninitialized.
34 std::string
ToString() const;
36 // Hash operator for hash containers.
38 size_t operator()(const MediaSource
& source
) const {
39 return base::Hash(source
.id());
47 } // namespace media_router
49 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SOURCE_H_