diff options
author | Takeshi Aimi <aimitakeshi@gmail.com> | 2010-10-08 23:05:49 +0900 |
---|---|---|
committer | Takeshi Aimi <aimitakeshi@gmail.com> | 2010-11-02 08:06:06 +0900 |
commit | c7b3ccc564448cb4b918728421f9402bc18278c5 (patch) | |
tree | 7d97c647cef5ae086048f62636bad3343f193459 /drm/libdrmframework/plugins/common | |
parent | 5b4d0e84d314bd58efb9dcf4e7f23f0d0e3fc630 (diff) | |
download | frameworks_base-c7b3ccc564448cb4b918728421f9402bc18278c5.zip frameworks_base-c7b3ccc564448cb4b918728421f9402bc18278c5.tar.gz frameworks_base-c7b3ccc564448cb4b918728421f9402bc18278c5.tar.bz2 |
Update of DRM framework
- Overload openDecryptSession() with uri parameter
in order to accept URI of DRM content,
Following API is added,
DecryptHandle*openDecryptSession(const char* uri);.
- Unify texisting three event types of processDrmInfo()
so that caller of DRM framework does not have to handle many event types.
- Let DrmManagerService call load/unload plugins API so that
client of DRM framework does not have to manage plug-in load/unload.
- Trivial fix in DrmManagerClient.java is also incorporated.
Changes are made by Sony Corporation.
Change-Id: If62b47fa0360718fdc943e6e6143671d7db26adc
Diffstat (limited to 'drm/libdrmframework/plugins/common')
-rw-r--r-- | drm/libdrmframework/plugins/common/include/DrmEngineBase.h | 15 | ||||
-rw-r--r-- | drm/libdrmframework/plugins/common/include/IDrmEngine.h | 12 |
2 files changed, 27 insertions, 0 deletions
diff --git a/drm/libdrmframework/plugins/common/include/DrmEngineBase.h b/drm/libdrmframework/plugins/common/include/DrmEngineBase.h index b355534..5851af5 100644 --- a/drm/libdrmframework/plugins/common/include/DrmEngineBase.h +++ b/drm/libdrmframework/plugins/common/include/DrmEngineBase.h @@ -80,6 +80,9 @@ public: status_t openDecryptSession( int uniqueId, DecryptHandle* decryptHandle, int fd, int offset, int length); + status_t openDecryptSession( + int uniqueId, DecryptHandle* decryptHandle, const char* uri); + status_t closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle); status_t initializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, @@ -355,6 +358,18 @@ protected: int uniqueId, DecryptHandle* decryptHandle, int fd, int offset, int length) = 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] uri Path of the protected content to be decrypted + * @return + * DRM_ERROR_CANNOT_HANDLE for failure and DRM_NO_ERROR for success + */ + virtual status_t onOpenDecryptSession( + int uniqueId, DecryptHandle* decryptHandle, const char* uri) = 0; + + /** * 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 b711500..cc03ef2 100644 --- a/drm/libdrmframework/plugins/common/include/IDrmEngine.h +++ b/drm/libdrmframework/plugins/common/include/IDrmEngine.h @@ -315,6 +315,18 @@ public: int uniqueId, DecryptHandle* decryptHandle, int fd, int offset, int length) = 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] uri Path of the protected content to be decrypted + * @return + * DRM_ERROR_CANNOT_HANDLE for failure and DRM_NO_ERROR for success + */ + virtual status_t openDecryptSession( + int uniqueId, DecryptHandle* decryptHandle, const char* uri) = 0; + + /** * Close the decrypt session for the given handle * * @param[in] uniqueId Unique identifier for a session |