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