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