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(int uniqueId) { 28 } 29 30 status_t NoOpDrmManagerClientImpl::setOnInfoListener( 31 int uniqueId, const sp<DrmManagerClient::OnInfoListener>& infoListener) { 32 return UNKNOWN_ERROR; 33 } 34 35 DrmConstraints* NoOpDrmManagerClientImpl::getConstraints(int uniqueId, const String8* path, const int action) { 36 return NULL; 37 } 38 39 DrmMetadata* NoOpDrmManagerClientImpl::getMetadata(int uniqueId, const String8* path) { 40 return NULL; 41 } 42 43 bool NoOpDrmManagerClientImpl::canHandle(int uniqueId, const String8& path, const String8& mimeType) { 44 return false; 45 } 46 47 DrmInfoStatus* NoOpDrmManagerClientImpl::processDrmInfo(int uniqueId, const DrmInfo* drmInfo) { 48 return NULL; 49 } 50 51 DrmInfo* NoOpDrmManagerClientImpl::acquireDrmInfo(int uniqueId, const DrmInfoRequest* drmInfoRequest) { 52 return NULL; 53 } 54 55 status_t NoOpDrmManagerClientImpl::saveRights(int uniqueId, const DrmRights& drmRights, 56 const String8& rightsPath, const String8& contentPath) { 57 return UNKNOWN_ERROR; 58 } 59 60 String8 NoOpDrmManagerClientImpl::getOriginalMimeType(int uniqueId, const String8& path, int fd) { 61 return String8(); 62 } 63 64 int NoOpDrmManagerClientImpl::getDrmObjectType(int uniqueId, const String8& path, const String8& mimeType) { 65 return -1; 66 } 67 68 int NoOpDrmManagerClientImpl::checkRightsStatus(int uniqueId, const String8& path, int action) { 69 return -1; 70 } 71 72 status_t NoOpDrmManagerClientImpl::consumeRights(int uniqueId, sp<DecryptHandle> &decryptHandle, int action, bool reserve) { 73 return UNKNOWN_ERROR; 74 } 75 76 status_t NoOpDrmManagerClientImpl::setPlaybackStatus( 77 int uniqueId, sp<DecryptHandle> &decryptHandle, int playbackStatus, int64_t position) { 78 return UNKNOWN_ERROR; 79 } 80 81 bool NoOpDrmManagerClientImpl::validateAction( 82 int uniqueId, const String8& path, int action, const ActionDescription& description) { 83 return false; 84 } 85 86 status_t NoOpDrmManagerClientImpl::removeRights(int uniqueId, const String8& path) { 87 return UNKNOWN_ERROR; 88 } 89 90 status_t NoOpDrmManagerClientImpl::removeAllRights(int uniqueId) { 91 return UNKNOWN_ERROR; 92 } 93 94 int NoOpDrmManagerClientImpl::openConvertSession(int uniqueId, const String8& mimeType) { 95 return -1; 96 } 97 98 DrmConvertedStatus* NoOpDrmManagerClientImpl::convertData(int uniqueId, int convertId, const DrmBuffer* inputData) { 99 return NULL; 100 } 101 102 DrmConvertedStatus* NoOpDrmManagerClientImpl::closeConvertSession(int uniqueId, int convertId) { 103 return NULL; 104 } 105 106 status_t NoOpDrmManagerClientImpl::getAllSupportInfo(int uniqueId, int* length, DrmSupportInfo** drmSupportInfoArray) { 107 return UNKNOWN_ERROR; 108 } 109 110 sp<DecryptHandle> NoOpDrmManagerClientImpl::openDecryptSession( 111 int uniqueId, int fd, off64_t offset, off64_t length, const char* mime) { 112 return NULL; 113 } 114 115 sp<DecryptHandle> NoOpDrmManagerClientImpl::openDecryptSession( 116 int uniqueId, const char* uri, const char* mime) { 117 return NULL; 118 } 119 120 sp<DecryptHandle> NoOpDrmManagerClientImpl::openDecryptSession(int uniqueId, const DrmBuffer& buf, 121 const String8& mimeType) { 122 return NULL; 123 } 124 125 status_t NoOpDrmManagerClientImpl::closeDecryptSession(int uniqueId, sp<DecryptHandle> &decryptHandle) { 126 return UNKNOWN_ERROR; 127 } 128 129 status_t NoOpDrmManagerClientImpl::initializeDecryptUnit(int uniqueId, sp<DecryptHandle> &decryptHandle, 130 int decryptUnitId, const DrmBuffer* headerInfo) { 131 return UNKNOWN_ERROR; 132 } 133 134 status_t NoOpDrmManagerClientImpl::decrypt(int uniqueId, sp<DecryptHandle> &decryptHandle, int decryptUnitId, 135 const DrmBuffer* encBuffer, DrmBuffer** decBuffer, DrmBuffer* IV) { 136 return UNKNOWN_ERROR; 137 } 138 139 status_t NoOpDrmManagerClientImpl::finalizeDecryptUnit(int uniqueId, sp<DecryptHandle> &decryptHandle, int decryptUnitId) { 140 return UNKNOWN_ERROR; 141 } 142 143 ssize_t NoOpDrmManagerClientImpl::pread(int uniqueId, sp<DecryptHandle> &decryptHandle, 144 void* buffer, ssize_t numBytes, off64_t offset) { 145 return -1; 146 } 147 148 status_t NoOpDrmManagerClientImpl::notify(const DrmInfoEvent& event) { 149 return UNKNOWN_ERROR; 150 } 151 152 } 153