diff options
Diffstat (limited to 'drmproperty.cpp')
-rw-r--r-- | drmproperty.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drmproperty.cpp b/drmproperty.cpp index e71c159..dcab05e 100644 --- a/drmproperty.cpp +++ b/drmproperty.cpp @@ -99,4 +99,15 @@ int DrmProperty::value(uint64_t *value) const { return -EINVAL; } } + +std::tuple<uint64_t, int> DrmProperty::GetEnumValueWithName( + std::string name) const { + for (auto it : enums_) { + if (it.name_.compare(name) == 0) { + return std::make_tuple(it.value_, 0); + } + } + + return std::make_tuple(UINT64_MAX, -EINVAL); +} } // namespace android |