key_system_names.h revision f2477e01787aa58f445919b809d89e252beef54f
1// Copyright 2013 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 MEDIA_CDM_KEY_SYSTEM_NAMES_H_
6#define MEDIA_CDM_KEY_SYSTEM_NAMES_H_
7
8#include <string>
9
10#include "media/base/media_export.h"
11
12namespace media {
13
14// TODO(jrummell): Change other uses of Clear Key to use this common value.
15
16// The key system names for Clear Key.
17MEDIA_EXPORT extern const char kPrefixedClearKey[];
18MEDIA_EXPORT extern const char kUnprefixedClearKey[];
19
20// The key system name for External Clear Key.
21MEDIA_EXPORT extern const char kExternalClearKey[];
22
23// Returns true if |key_system| is Clear Key, false otherwise.
24MEDIA_EXPORT inline bool IsClearKey(const std::string& key_system) {
25  return key_system == kPrefixedClearKey || key_system == kUnprefixedClearKey;
26}
27
28// Returns true if |key_system| is External Clear Key, false otherwise.
29MEDIA_EXPORT bool IsExternalClearKey(const std::string& key_system);
30
31}  // namespace media
32
33#endif  // MEDIA_CDM_KEY_SYSTEM_NAMES_H_
34