diff options
Diffstat (limited to 'drm/libdrmframework/plugins')
-rw-r--r-- | drm/libdrmframework/plugins/common/include/DrmEngineBase.h | 18 | ||||
-rw-r--r-- | drm/libdrmframework/plugins/common/include/IDrmEngine.h | 13 |
2 files changed, 31 insertions, 0 deletions
diff --git a/drm/libdrmframework/plugins/common/include/DrmEngineBase.h b/drm/libdrmframework/plugins/common/include/DrmEngineBase.h index 08f6e6d..6cebb97 100644 --- a/drm/libdrmframework/plugins/common/include/DrmEngineBase.h +++ b/drm/libdrmframework/plugins/common/include/DrmEngineBase.h @@ -87,6 +87,9 @@ public: int uniqueId, DecryptHandle* decryptHandle, const char* uri, const char* mime); + status_t openDecryptSession(int uniqueId, DecryptHandle* decryptHandle, + const DrmBuffer& buf, const String8& mimeType); + status_t closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle); status_t initializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, @@ -433,6 +436,21 @@ protected: } /** + * Open the decrypt session to decrypt the given protected content + * + * @param[in] uniqueId Unique identifier for a session + * @param[in] decryptHandle Handle for the current decryption session + * @param[in] buf Data to initiate decrypt session + * @param[in] mimeType Mime type of the protected content + * @return + * DRM_ERROR_CANNOT_HANDLE for failure and DRM_NO_ERROR for success + */ + virtual status_t onOpenDecryptSession(int uniqueId, DecryptHandle* decryptHandle, + const DrmBuffer& buf, const String8& mimeType) { + return DRM_ERROR_CANNOT_HANDLE; + } + + /** * Close the decrypt session for the given handle * * @param[in] uniqueId Unique identifier for a session diff --git a/drm/libdrmframework/plugins/common/include/IDrmEngine.h b/drm/libdrmframework/plugins/common/include/IDrmEngine.h index dcf5977..60f4c1b 100644 --- a/drm/libdrmframework/plugins/common/include/IDrmEngine.h +++ b/drm/libdrmframework/plugins/common/include/IDrmEngine.h @@ -345,6 +345,19 @@ public: const char* uri, const char* mime) = 0; /** + * Open the decrypt session to decrypt the given protected content + * + * @param[in] uniqueId Unique identifier for a session + * @param[in] decryptHandle Handle for the current decryption session + * @param[in] buf Data to initiate decrypt session + * @param[in] mimeType Mime type of the protected content + * @return + * DRM_ERROR_CANNOT_HANDLE for failure and DRM_NO_ERROR for success + */ + virtual status_t openDecryptSession(int uniqueId, DecryptHandle* decryptHandle, + const DrmBuffer& buf, const String8& mimeType) = 0; + + /** * Close the decrypt session for the given handle * * @param[in] uniqueId Unique identifier for a session |