diff options
| author | Gloria Wang <gwang@google.com> | 2010-10-07 15:27:17 -0700 |
|---|---|---|
| committer | Jean-Baptiste Queru <jbq@google.com> | 2010-10-07 15:27:17 -0700 |
| commit | 9580b8ce6553ddde03db594fd4fd4f59ca61c382 (patch) | |
| tree | bac634abd9cb09389028cbc9c3c2d80adbb7f3d2 /include/drm/DrmManagerClient.h | |
| parent | bb70837397e3fb437b7b4443b37d7a83c11e6e43 (diff) | |
| parent | e6ad0e477b5d4326487059e5d6c4697f97accbd1 (diff) | |
| download | frameworks_base-9580b8ce6553ddde03db594fd4fd4f59ca61c382.zip frameworks_base-9580b8ce6553ddde03db594fd4fd4f59ca61c382.tar.gz frameworks_base-9580b8ce6553ddde03db594fd4fd4f59ca61c382.tar.bz2 | |
resolved conflicts for merge of e6ad0e47 to gingerbread-plus-aosp
Change-Id: I63b00932b0f8b975da31aa9a010369db2d49fd76
Diffstat (limited to 'include/drm/DrmManagerClient.h')
| -rw-r--r-- | include/drm/DrmManagerClient.h | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/include/drm/DrmManagerClient.h b/include/drm/DrmManagerClient.h index 7d14c44..c2ad084 100644 --- a/include/drm/DrmManagerClient.h +++ b/include/drm/DrmManagerClient.h @@ -70,8 +70,10 @@ public: * Close the decrypt session for the given handle * * @param[in] decryptHandle Handle for the decryption session + * @return status_t + * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure */ - void closeDecryptSession(DecryptHandle* decryptHandle); + status_t closeDecryptSession(DecryptHandle* decryptHandle); /** * Consumes the rights for a content. @@ -81,8 +83,11 @@ public: * @param[in] decryptHandle Handle for the decryption session * @param[in] action Action to perform. (Action::DEFAULT, Action::PLAY, etc) * @param[in] reserve True if the rights should be reserved. + * @return status_t + * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure. + * In case license has been expired, DRM_ERROR_LICENSE_EXPIRED will be returned. */ - void consumeRights(DecryptHandle* decryptHandle, int action, bool reserve); + status_t consumeRights(DecryptHandle* decryptHandle, int action, bool reserve); /** * Informs the DRM engine about the playback actions performed on the DRM files. @@ -90,9 +95,11 @@ public: * @param[in] decryptHandle Handle for the decryption session * @param[in] playbackStatus Playback action (Playback::START, Playback::STOP, Playback::PAUSE) * @param[in] position Position in the file (in milliseconds) where the start occurs. - * Only valid together with Playback::START. + * Only valid together with Playback::START. + * @return status_t + * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure */ - void setPlaybackStatus(DecryptHandle* decryptHandle, int playbackStatus, int position); + status_t setPlaybackStatus(DecryptHandle* decryptHandle, int playbackStatus, int position); /** * Initialize decryption for the given unit of the protected content @@ -100,8 +107,10 @@ public: * @param[in] decryptHandle Handle for the decryption session * @param[in] decryptUnitId ID which specifies decryption unit, such as track ID * @param[in] headerInfo Information for initializing decryption of this decrypUnit + * @return status_t + * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure */ - void initializeDecryptUnit( + status_t initializeDecryptUnit( DecryptHandle* decryptHandle, int decryptUnitId, const DrmBuffer* headerInfo); /** @@ -113,6 +122,7 @@ public: * @param[in] decryptUnitId ID which specifies decryption unit, such as track ID * @param[in] encBuffer Encrypted data block * @param[out] decBuffer Decrypted data block + * @param[in] IV Optional buffer * @return status_t * Returns the error code for this API * DRM_NO_ERROR for success, and one of DRM_ERROR_UNKNOWN, DRM_ERROR_LICENSE_EXPIRED @@ -121,15 +131,17 @@ public: */ status_t decrypt( DecryptHandle* decryptHandle, int decryptUnitId, - const DrmBuffer* encBuffer, DrmBuffer** decBuffer); + const DrmBuffer* encBuffer, DrmBuffer** decBuffer, DrmBuffer* IV = NULL); /** * Finalize decryption for the given unit of the protected content * * @param[in] decryptHandle Handle for the decryption session * @param[in] decryptUnitId ID which specifies decryption unit, such as track ID + * @return status_t + * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure */ - void finalizeDecryptUnit(DecryptHandle* decryptHandle, int decryptUnitId); + status_t finalizeDecryptUnit(DecryptHandle* decryptHandle, int decryptUnitId); /** * Reads the specified number of bytes from an open DRM file. @@ -217,8 +229,10 @@ public: * @param[in] drmRights DrmRights to be saved * @param[in] rightsPath File path where rights to be saved * @param[in] contentPath File path where content was saved + * @return status_t + * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure */ - void saveRights( + status_t saveRights( const DrmRights& drmRights, const String8& rightsPath, const String8& contentPath); /** @@ -256,15 +270,19 @@ public: * Removes the rights associated with the given protected content * * @param[in] path Path of the protected content + * @return status_t + * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure */ - void removeRights(const String8& path); + status_t removeRights(const String8& path); /** * Removes all the rights information of each plug-in associated with * DRM framework. Will be used in master reset * + * @return status_t + * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure */ - void removeAllRights(); + status_t removeAllRights(); /** * This API is for Forward Lock DRM. |
