summaryrefslogtreecommitdiffstats
path: root/media/cdm/key_system_names.h
blob: 8b231718fffa89d8620f0751cc68783cd229ebac (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
// Copyright 2013 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 MEDIA_CDM_KEY_SYSTEM_NAMES_H_
#define MEDIA_CDM_KEY_SYSTEM_NAMES_H_

#include <string>

#include "media/base/media_export.h"

namespace media {

// TODO(jrummell): Change other uses of Clear Key to use this common value.

// The key system name for Clear Key.
MEDIA_EXPORT extern const char kClearKey[];

// The key system name for External Clear Key.
MEDIA_EXPORT extern const char kExternalClearKey[];

// Returns true if |key_system| is Clear Key, false otherwise.
MEDIA_EXPORT bool IsClearKey(const std::string& key_system);

// Returns true if |key_system| is (reverse) sub-domain of |base|.
MEDIA_EXPORT bool IsChildKeySystemOf(const std::string& key_system,
                                     const std::string& base);

// Returns true if |key_system| is External Clear Key, false otherwise.
MEDIA_EXPORT bool IsExternalClearKey(const std::string& key_system);

}  // namespace media

#endif  // MEDIA_CDM_KEY_SYSTEM_NAMES_H_