| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 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 "NoOpDrmManagerClientImpl.h" |
| 18 | |
| 19 | namespace android { |
| 20 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 21 | void NoOpDrmManagerClientImpl::remove(int /* uniqueId */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 22 | } |
| 23 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 24 | void NoOpDrmManagerClientImpl::addClient(int /* uniqueId */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 25 | } |
| 26 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 27 | void NoOpDrmManagerClientImpl::removeClient(int /* uniqueId */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | status_t NoOpDrmManagerClientImpl::setOnInfoListener( |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 31 | int /* uniqueId */, |
| 32 | const sp<DrmManagerClient::OnInfoListener>& /* infoListener */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 33 | return UNKNOWN_ERROR; |
| 34 | } |
| 35 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 36 | DrmConstraints* NoOpDrmManagerClientImpl::getConstraints(int /* uniqueId */, |
| 37 | const String8* /* path */, const int /* action */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 38 | return NULL; |
| 39 | } |
| 40 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 41 | DrmMetadata* NoOpDrmManagerClientImpl::getMetadata(int /* uniqueId */, |
| 42 | const String8* /* path */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 43 | return NULL; |
| 44 | } |
| 45 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 46 | bool NoOpDrmManagerClientImpl::canHandle(int /* uniqueId */, |
| 47 | const String8& /* path */, const String8& /* mimeType */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 48 | return false; |
| 49 | } |
| 50 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 51 | DrmInfoStatus* NoOpDrmManagerClientImpl::processDrmInfo(int /* uniqueId */, |
| 52 | const DrmInfo* /* drmInfo */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 53 | return NULL; |
| 54 | } |
| 55 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 56 | DrmInfo* NoOpDrmManagerClientImpl::acquireDrmInfo(int /* uniqueId */, |
| 57 | const DrmInfoRequest* /* drmInfoRequest */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 58 | return NULL; |
| 59 | } |
| 60 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 61 | status_t NoOpDrmManagerClientImpl::saveRights(int /* uniqueId */, |
| 62 | const DrmRights& /* drmRights */, const String8& /* rightsPath */, |
| 63 | const String8& /* contentPath */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 64 | return UNKNOWN_ERROR; |
| 65 | } |
| 66 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 67 | String8 NoOpDrmManagerClientImpl::getOriginalMimeType(int /* uniqueId */, |
| 68 | const String8& /* path */, int /* fd */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 69 | return String8(); |
| 70 | } |
| 71 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 72 | int NoOpDrmManagerClientImpl::getDrmObjectType(int /* uniqueId */, |
| 73 | const String8& /* path */, const String8& /* mimeType */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 74 | return -1; |
| 75 | } |
| 76 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 77 | int NoOpDrmManagerClientImpl::checkRightsStatus(int /* uniqueId */, |
| 78 | const String8& /* path */, int /* action */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 79 | return -1; |
| 80 | } |
| 81 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 82 | status_t NoOpDrmManagerClientImpl::consumeRights(int /* uniqueId */, |
| 83 | sp<DecryptHandle>& /* decryptHandle */, int /* action */, |
| 84 | bool /* reserve */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 85 | return UNKNOWN_ERROR; |
| 86 | } |
| 87 | |
| 88 | status_t NoOpDrmManagerClientImpl::setPlaybackStatus( |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 89 | int /* uniqueId */, sp<DecryptHandle>& /* decryptHandle */, |
| 90 | int /* playbackStatus */, int64_t /* position */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 91 | return UNKNOWN_ERROR; |
| 92 | } |
| 93 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 94 | bool NoOpDrmManagerClientImpl::validateAction(int /* uniqueId */, |
| 95 | const String8& /* path */, int /* action */, |
| 96 | const ActionDescription& /* description */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 97 | return false; |
| 98 | } |
| 99 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 100 | status_t NoOpDrmManagerClientImpl::removeRights(int /* uniqueId */, |
| 101 | const String8& /* path */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 102 | return UNKNOWN_ERROR; |
| 103 | } |
| 104 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 105 | status_t NoOpDrmManagerClientImpl::removeAllRights(int /* uniqueId */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 106 | return UNKNOWN_ERROR; |
| 107 | } |
| 108 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 109 | int NoOpDrmManagerClientImpl::openConvertSession(int /* uniqueId */, |
| 110 | const String8& /* mimeType */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 111 | return -1; |
| 112 | } |
| 113 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 114 | DrmConvertedStatus* NoOpDrmManagerClientImpl::convertData(int /* uniqueId */, |
| 115 | int /* convertId */, const DrmBuffer* /* inputData */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 116 | return NULL; |
| 117 | } |
| 118 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 119 | DrmConvertedStatus* NoOpDrmManagerClientImpl::closeConvertSession( |
| 120 | int /* uniqueId */, int /* convertId */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 121 | return NULL; |
| 122 | } |
| 123 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 124 | status_t NoOpDrmManagerClientImpl::getAllSupportInfo(int /* uniqueId */, |
| 125 | int* /* length */, DrmSupportInfo** /* drmSupportInfoArray */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 126 | return UNKNOWN_ERROR; |
| 127 | } |
| 128 | |
| 129 | sp<DecryptHandle> NoOpDrmManagerClientImpl::openDecryptSession( |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 130 | int /* uniqueId */, int /* fd */, off64_t /* offset */, |
| 131 | off64_t /* length */, const char* /* mime */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 132 | return NULL; |
| 133 | } |
| 134 | |
| 135 | sp<DecryptHandle> NoOpDrmManagerClientImpl::openDecryptSession( |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 136 | int /* uniqueId */, const char* /* uri */, const char* /* mime */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 137 | return NULL; |
| 138 | } |
| 139 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 140 | sp<DecryptHandle> NoOpDrmManagerClientImpl::openDecryptSession(int /* uniqueId */, |
| 141 | const DrmBuffer& /* buf */, const String8& /* mimeType */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 142 | return NULL; |
| 143 | } |
| 144 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 145 | status_t NoOpDrmManagerClientImpl::closeDecryptSession(int /* uniqueId */, |
| 146 | sp<DecryptHandle>& /* decryptHandle */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 147 | return UNKNOWN_ERROR; |
| 148 | } |
| 149 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 150 | status_t NoOpDrmManagerClientImpl::initializeDecryptUnit(int /* uniqueId */, |
| 151 | sp<DecryptHandle>& /* decryptHandle */, int /* decryptUnitId */, |
| 152 | const DrmBuffer* /* headerInfo */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 153 | return UNKNOWN_ERROR; |
| 154 | } |
| 155 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 156 | status_t NoOpDrmManagerClientImpl::decrypt(int /* uniqueId */, |
| 157 | sp<DecryptHandle>& /* decryptHandle */, int /* decryptUnitId */, |
| 158 | const DrmBuffer* /* encBuffer */, DrmBuffer** /* decBuffer */, |
| 159 | DrmBuffer* /* IV */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 160 | return UNKNOWN_ERROR; |
| 161 | } |
| 162 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 163 | status_t NoOpDrmManagerClientImpl::finalizeDecryptUnit(int /* uniqueId */, |
| 164 | sp<DecryptHandle>& /* decryptHandle */, int /* decryptUnitId */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 165 | return UNKNOWN_ERROR; |
| 166 | } |
| 167 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 168 | ssize_t NoOpDrmManagerClientImpl::pread(int /* uniqueId */, |
| 169 | sp<DecryptHandle>& /* decryptHandle */, |
| 170 | void* /* buffer */, ssize_t /* numBytes */, off64_t /* offset */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 171 | return -1; |
| 172 | } |
| 173 | |
| Mark Salyzyn | 5a8dbe7 | 2014-06-23 14:13:52 -0700 | [diff] [blame] | 174 | status_t NoOpDrmManagerClientImpl::notify(const DrmInfoEvent& /* event */) { |
| Adam Lesinski | 927634a | 2014-06-04 15:14:03 -0700 | [diff] [blame] | 175 | return UNKNOWN_ERROR; |
| 176 | } |
| 177 | |
| 178 | } |