summaryrefslogtreecommitdiff
path: root/drm/common/DrmEngineBase.cpp
diff options
context:
space:
mode:
authorTakeshi Aimi <aimitakeshi@gmail.com>2010-09-20 23:40:41 +0900
committerTakeshi Aimi <aimitakeshi@gmail.com>2010-10-04 22:14:53 +0900
commit2272ee27d9022d173b6eab45c409b3c3f57f30ec (patch)
tree42fd86597781bdf6b3795907ec1d086b0b549a5c /drm/common/DrmEngineBase.cpp
parent0335b70c6cdbe96650d4bed817f9233cd8db1c6d (diff)
Update of DRM framework.
- Change "void" type of return value to "int" for returning status. - Add some of overloaded Java APIs which accept database Uri as input. - Add asynchronous APIs - Add OnEventListener and OnErrorListener for asynchronous APIs - Disable debug log - Change decrypt() API to accept an optional buffer needed by some of DRM schemes Changes are incorporated by Sony Corporation. Change-Id: I414a165e22cc79be6ea7cd28041788aa2b6b8f7c
Diffstat (limited to 'drm/common/DrmEngineBase.cpp')
-rw-r--r--drm/common/DrmEngineBase.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/drm/common/DrmEngineBase.cpp b/drm/common/DrmEngineBase.cpp
index 70398e8b..17cdf544 100644
--- a/drm/common/DrmEngineBase.cpp
+++ b/drm/common/DrmEngineBase.cpp
@@ -52,7 +52,7 @@ DrmInfoStatus* DrmEngineBase::processDrmInfo(int uniqueId, const DrmInfo* drmInf
return onProcessDrmInfo(uniqueId, drmInfo);
}
-void DrmEngineBase::saveRights(
+status_t DrmEngineBase::saveRights(
int uniqueId, const DrmRights& drmRights,
const String8& rightsPath, const String8& contentPath) {
return onSaveRights(uniqueId, drmRights, rightsPath, contentPath);
@@ -74,14 +74,14 @@ int DrmEngineBase::checkRightsStatus(int uniqueId, const String8& path, int acti
return onCheckRightsStatus(uniqueId, path, action);
}
-void DrmEngineBase::consumeRights(
+status_t DrmEngineBase::consumeRights(
int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve) {
- onConsumeRights(uniqueId, decryptHandle, action, reserve);
+ return onConsumeRights(uniqueId, decryptHandle, action, reserve);
}
-void DrmEngineBase::setPlaybackStatus(
+status_t DrmEngineBase::setPlaybackStatus(
int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position) {
- onSetPlaybackStatus(uniqueId, decryptHandle, playbackStatus, position);
+ return onSetPlaybackStatus(uniqueId, decryptHandle, playbackStatus, position);
}
bool DrmEngineBase::validateAction(
@@ -90,16 +90,16 @@ bool DrmEngineBase::validateAction(
return onValidateAction(uniqueId, path, action, description);
}
-void DrmEngineBase::removeRights(int uniqueId, const String8& path) {
- onRemoveRights(uniqueId, path);
+status_t DrmEngineBase::removeRights(int uniqueId, const String8& path) {
+ return onRemoveRights(uniqueId, path);
}
-void DrmEngineBase::removeAllRights(int uniqueId) {
- onRemoveAllRights(uniqueId);
+status_t DrmEngineBase::removeAllRights(int uniqueId) {
+ return onRemoveAllRights(uniqueId);
}
-void DrmEngineBase::openConvertSession(int uniqueId, int convertId) {
- onOpenConvertSession(uniqueId, convertId);
+status_t DrmEngineBase::openConvertSession(int uniqueId, int convertId) {
+ return onOpenConvertSession(uniqueId, convertId);
}
DrmConvertedStatus* DrmEngineBase::convertData(
@@ -120,24 +120,24 @@ status_t DrmEngineBase::openDecryptSession(
return onOpenDecryptSession(uniqueId, decryptHandle, fd, offset, length);
}
-void DrmEngineBase::closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle) {
- onCloseDecryptSession(uniqueId, decryptHandle);
+status_t DrmEngineBase::closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle) {
+ return onCloseDecryptSession(uniqueId, decryptHandle);
}
-void DrmEngineBase::initializeDecryptUnit(
+status_t DrmEngineBase::initializeDecryptUnit(
int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId, const DrmBuffer* headerInfo) {
- onInitializeDecryptUnit(uniqueId, decryptHandle, decryptUnitId, headerInfo);
+ return onInitializeDecryptUnit(uniqueId, decryptHandle, decryptUnitId, headerInfo);
}
status_t DrmEngineBase::decrypt(
int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId,
- const DrmBuffer* encBuffer, DrmBuffer** decBuffer) {
- return onDecrypt(uniqueId, decryptHandle, decryptUnitId, encBuffer, decBuffer);
+ const DrmBuffer* encBuffer, DrmBuffer** decBuffer, DrmBuffer* IV) {
+ return onDecrypt(uniqueId, decryptHandle, decryptUnitId, encBuffer, decBuffer, IV);
}
-void DrmEngineBase::finalizeDecryptUnit(
+status_t DrmEngineBase::finalizeDecryptUnit(
int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId) {
- onFinalizeDecryptUnit(uniqueId, decryptHandle, decryptUnitId);
+ return onFinalizeDecryptUnit(uniqueId, decryptHandle, decryptUnitId);
}
ssize_t DrmEngineBase::pread(