diff options
author | Takeshi Aimi <aimitakeshi@gmail.com> | 2010-09-20 23:40:41 +0900 |
---|---|---|
committer | Takeshi Aimi <aimitakeshi@gmail.com> | 2010-10-04 22:14:53 +0900 |
commit | 2272ee27d9022d173b6eab45c409b3c3f57f30ec (patch) | |
tree | 42fd86597781bdf6b3795907ec1d086b0b549a5c /drm/libdrmframework/include/DrmManager.h | |
parent | 0335b70c6cdbe96650d4bed817f9233cd8db1c6d (diff) | |
download | frameworks_av-2272ee27d9022d173b6eab45c409b3c3f57f30ec.zip frameworks_av-2272ee27d9022d173b6eab45c409b3c3f57f30ec.tar.gz frameworks_av-2272ee27d9022d173b6eab45c409b3c3f57f30ec.tar.bz2 |
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/libdrmframework/include/DrmManager.h')
-rw-r--r-- | drm/libdrmframework/include/DrmManager.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drm/libdrmframework/include/DrmManager.h b/drm/libdrmframework/include/DrmManager.h index 2ba9e99..dc3e460 100644 --- a/drm/libdrmframework/include/DrmManager.h +++ b/drm/libdrmframework/include/DrmManager.h @@ -53,6 +53,9 @@ public: virtual ~DrmManager(); public: + int addUniqueId(int uniqueId); + + void removeUniqueId(int uniqueId); status_t loadPlugIns(int uniqueId); @@ -73,7 +76,7 @@ public: DrmInfo* acquireDrmInfo(int uniqueId, const DrmInfoRequest* drmInfoRequest); - void saveRights(int uniqueId, const DrmRights& drmRights, + status_t saveRights(int uniqueId, const DrmRights& drmRights, const String8& rightsPath, const String8& contentPath); String8 getOriginalMimeType(int uniqueId, const String8& path); @@ -82,17 +85,17 @@ public: int checkRightsStatus(int uniqueId, const String8& path, int action); - void consumeRights(int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve); + status_t consumeRights(int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve); - void setPlaybackStatus( + status_t setPlaybackStatus( int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position); bool validateAction( int uniqueId, const String8& path, int action, const ActionDescription& description); - void removeRights(int uniqueId, const String8& path); + status_t removeRights(int uniqueId, const String8& path); - void removeAllRights(int uniqueId); + status_t removeAllRights(int uniqueId); int openConvertSession(int uniqueId, const String8& mimeType); @@ -104,15 +107,15 @@ public: DecryptHandle* openDecryptSession(int uniqueId, int fd, int offset, int length); - void closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle); + status_t closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle); - void initializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, + status_t initializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId, const DrmBuffer* headerInfo); - status_t decrypt(int uniqueId, DecryptHandle* decryptHandle, - int decryptUnitId, const DrmBuffer* encBuffer,DrmBuffer** decBuffer); + status_t decrypt(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId, + const DrmBuffer* encBuffer, DrmBuffer** decBuffer, DrmBuffer* IV); - void finalizeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId); + status_t finalizeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId); ssize_t pread(int uniqueId, DecryptHandle* decryptHandle, void* buffer, ssize_t numBytes, off_t offset); @@ -133,6 +136,7 @@ private: void initializePlugIns(int uniqueId); private: + static Vector<int> mUniqueIdVector; static const String8 EMPTY_STRING; int mDecryptSessionId; |