NoOpDrmManagerClientImpl.cpp 6.2 KB

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