aimitakeshi | d074e30 | 2010-07-29 10:12:27 +0900 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2010 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include <drm/DrmRights.h> |
| 18 | |
| 19 | using namespace android; |
| 20 | |
| 21 | DrmRights::DrmRights(const String8& rightsFilePath, const String8& mimeType, |
| 22 | const String8& accountId, const String8& subscriptionId) { |
| 23 | /** |
| 24 | * TODO Read DrmRights from rights file |
| 25 | */ |
| 26 | } |
| 27 | |
| 28 | DrmRights::DrmRights(const DrmBuffer& rightsData, const String8& mimeType, |
| 29 | const String8& accountId, const String8& subscriptionId) : |
| 30 | mData(rightsData), |
| 31 | mMimeType(mimeType), |
| 32 | mAccountId(accountId), |
| 33 | mSubscriptionId(subscriptionId) { |
| 34 | } |
| 35 | |
| 36 | const DrmBuffer& DrmRights::getData(void) const { |
| 37 | return mData; |
| 38 | } |
| 39 | |
| 40 | String8 DrmRights::getMimeType(void) const { |
| 41 | return mMimeType; |
| 42 | } |
| 43 | |
| 44 | String8 DrmRights::getAccountId(void) const { |
| 45 | return mAccountId; |
| 46 | } |
| 47 | |
| 48 | String8 DrmRights::getSubscriptionId(void) const { |
| 49 | return mSubscriptionId; |
| 50 | } |
| 51 | |