summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2010-11-02 14:59:51 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-11-02 14:59:51 -0700
commit3041096d137144d9d1ebdd6df88ebe8e85133c05 (patch)
tree8bce55a67fc892803bb40a4655472c2cfba6ea92 /include/drm
parent606649635ecb5a7f1378f2538a25fee64214ff42 (diff)
parentbf955268acc4a5a73632cb5f64093d1796c769df (diff)
downloadframeworks_av-3041096d137144d9d1ebdd6df88ebe8e85133c05.zip
frameworks_av-3041096d137144d9d1ebdd6df88ebe8e85133c05.tar.gz
frameworks_av-3041096d137144d9d1ebdd6df88ebe8e85133c05.tar.bz2
am ef8a810b: Merge "Update of DRM framework"
* commit 'ef8a810b3b11d177a64111125eaa44bb76624414': Update of DRM framework
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/DrmInfoEvent.h4
-rw-r--r--include/drm/DrmInfoStatus.h4
-rw-r--r--include/drm/DrmManagerClient.h31
3 files changed, 16 insertions, 23 deletions
diff --git a/include/drm/DrmInfoEvent.h b/include/drm/DrmInfoEvent.h
index c722bd3..7b409ff 100644
--- a/include/drm/DrmInfoEvent.h
+++ b/include/drm/DrmInfoEvent.h
@@ -59,8 +59,8 @@ public:
//! TYPE_NO_INTERNET_CONNECTION, when the Internet connection is missing and no attempt
//! can be made to renew rights
static const int TYPE_NO_INTERNET_CONNECTION = 2005;
- //! TYPE_REGISTRATION_FAILED, when registration with server failed.
- static const int TYPE_REGISTRATION_FAILED = 2006;
+ //! TYPE_PROCESS_DRM_INFO_FAILED, when failed to process DrmInfo.
+ static const int TYPE_PROCESS_DRM_INFO_FAILED = 2006;
public:
/**
diff --git a/include/drm/DrmInfoStatus.h b/include/drm/DrmInfoStatus.h
index 806aea1..88c0f40 100644
--- a/include/drm/DrmInfoStatus.h
+++ b/include/drm/DrmInfoStatus.h
@@ -41,10 +41,11 @@ public:
* Constructor for DrmInfoStatus
*
* @param[in] _statusCode Status of the communication
+ * @param[in] _infoType Type of the DRM information processed
* @param[in] _drmBuffer Rights information
* @param[in] _mimeType MIME type
*/
- DrmInfoStatus(int _statusCode, const DrmBuffer* _drmBuffer, const String8& _mimeType);
+ DrmInfoStatus(int _statusCode, int _infoType, const DrmBuffer* _drmBuffer, const String8& _mimeType);
/**
* Destructor for DrmInfoStatus
@@ -55,6 +56,7 @@ public:
public:
int statusCode;
+ int infoType;
const DrmBuffer* drmBuffer;
String8 mimeType;
};
diff --git a/include/drm/DrmManagerClient.h b/include/drm/DrmManagerClient.h
index c2ad084..5963c42 100644
--- a/include/drm/DrmManagerClient.h
+++ b/include/drm/DrmManagerClient.h
@@ -17,6 +17,7 @@
#ifndef __DRM_MANAGER_CLIENT_H__
#define __DRM_MANAGER_CLIENT_H__
+#include <utils/threads.h>
#include <binder/IInterface.h>
#include "drm_framework_common.h"
@@ -67,6 +68,15 @@ public:
DecryptHandle* openDecryptSession(int fd, int offset, int length);
/**
+ * Open the decrypt session to decrypt the given protected content
+ *
+ * @param[in] uri Path of the protected content to be decrypted
+ * @return
+ * Handle for the decryption session
+ */
+ DecryptHandle* openDecryptSession(const char* uri);
+
+ /**
* Close the decrypt session for the given handle
*
* @param[in] decryptHandle Handle for the decryption session
@@ -339,27 +349,8 @@ public:
status_t getAllSupportInfo(int* length, DrmSupportInfo** drmSupportInfoArray);
private:
- /**
- * Initialize DRM Manager
- * load available plug-ins from default plugInDirPath
- *
- * @return status_t
- * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure
- */
- status_t loadPlugIns();
-
- /**
- * Finalize DRM Manager
- * release resources associated with each plug-in
- * unload all plug-ins and etc.
- *
- * @return status_t
- * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure
- */
- status_t unloadPlugIns();
-
-private:
int mUniqueId;
+ Mutex mDecryptLock;
DrmManagerClientImpl* mDrmManagerClientImpl;
};