Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / ppapi / api / private / ppp_content_decryptor_private.idl
index f6cd1f0..46fc701 100644 (file)
@@ -9,7 +9,7 @@
  * Decryption Modules, not normal plugins.
  */
 label Chrome {
-  M34 = 0.11
+  M36 = 0.12
 };
 
 /**
@@ -31,7 +31,22 @@ interface PPP_ContentDecryptor_Private {
       [in] PP_Var key_system);
 
   /**
-   * Creates a session. <code>content_type</code> contains the MIME type of
+   * Provides a server certificate to be used to encrypt messages to the
+   * license server.
+   *
+   * @param[in] promise_id A reference for the promise that gets resolved or
+   * rejected depending upon the success or failure of setting the certificate.
+   *
+   * @param[in] server_certificate A <code>PP_Var</code> of type
+   * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the certificate to be used.
+   */
+  void SetServerCertificate(
+      [in] PP_Instance instance,
+      [in] uint32_t promise_id,
+      [in] PP_Var server_certificate);
+
+  /**
+   * Creates a session. <code>init_data_type</code> contains the MIME type of
    * <code>init_data</code>. <code>init_data</code> is a data buffer
    * containing data for use in generating the request.
    *
@@ -39,21 +54,25 @@ interface PPP_ContentDecryptor_Private {
    * it to the browser via <code>SessionCreated()</code> on the
    * <code>PPB_ContentDecryptor_Private</code> interface.
    *
-   * @param[in] session_id A reference for the session for which a session
-   * should be generated.
+   * @param[in] promise_id A reference for the promise that gets resolved or
+   * rejected depending upon the success or failure when creating the session.
    *
-   * @param[in] content_type A <code>PP_Var</code> of type
+   * @param[in] init_data_type A <code>PP_Var</code> of type
    * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data.
    *
    * @param[in] init_data A <code>PP_Var</code> of type
    * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific
    * initialization data.
+   *
+   * @param[in] session_type A <code>PP_SessionType</code> that indicates the
+   * type of session to be created.
    */
   void CreateSession(
       [in] PP_Instance instance,
-      [in] uint32_t session_id,
-      [in] PP_Var content_type,
-      [in] PP_Var init_data);
+      [in] uint32_t promise_id,
+      [in] PP_Var init_data_type,
+      [in] PP_Var init_data,
+      [in] PP_SessionType session_type);
 
   /**
    * Loads a session whose web session ID is <code>web_session_id</code>.
@@ -62,8 +81,8 @@ interface PPP_ContentDecryptor_Private {
    * <code>SessionCreated()</code> with <code>web_session_id</code> on the
    * <code>PPB_ContentDecryptor_Private</code> interface.
    *
-   * @param[in] session_id A reference for the session for which a session
-   * should be loaded.
+   * @param[in] promise_id A reference for the promise that gets resolved or
+   * rejected depending upon the success or failure of loading the session.
    *
    * @param[in] web_session_id A <code>PP_Var</code> of type
    * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
@@ -71,7 +90,7 @@ interface PPP_ContentDecryptor_Private {
    */
   void LoadSession(
       [in] PP_Instance instance,
-      [in] uint32_t session_id,
+      [in] uint32_t promise_id,
       [in] PP_Var web_session_id);
 
   /**
@@ -86,7 +105,12 @@ interface PPP_ContentDecryptor_Private {
    * <code>PPB_ContentDecryptor_Private</code> interface, and the browser
    * must notify the web application.
    *
-   * @param[in] session_id A reference for the session to update.
+   * @param[in] promise_id A reference for the promise that gets resolved or
+   * rejected depending upon the success or failure of updating the session.
+   *
+   * @param[in] web_session_id A <code>PP_Var</code> of type
+   * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
+   * to be updated.
    *
    * @param[in] response A <code>PP_Var</code> of type
    * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the license or other
@@ -94,18 +118,59 @@ interface PPP_ContentDecryptor_Private {
    */
   void UpdateSession(
       [in] PP_Instance instance,
-      [in] uint32_t session_id,
+      [in] uint32_t promise_id,
+      [in] PP_Var web_session_id,
       [in] PP_Var response);
 
   /**
-   * Release the specified session and related resources.
+   * Close the specified session and related resources.
+   *
+   * @param[in] promise_id A reference for the promise that gets resolved or
+   * rejected depending upon the success or failure of closing the session.
+   *
+   * @param[in] web_session_id A <code>PP_Var</code> of type
+   * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
+   * to be closed.
    *
-   * @param[in] session_id A reference for the session that should be
-   * released.
    */
-  void ReleaseSession(
+  void CloseSession(
       [in] PP_Instance instance,
-      [in] uint32_t session_id);
+      [in] uint32_t promise_id,
+      [in] PP_Var web_session_id);
+
+  /**
+   * Remove stored data associated with this session.
+   *
+   * @param[in] promise_id A reference for the promise that gets resolved or
+   * rejected depending upon the success or failure of removing the session
+   * data.
+   *
+   * @param[in] web_session_id A <code>PP_Var</code> of type
+   * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
+   * to be removed.
+   *
+   */
+  void RemoveSession(
+      [in] PP_Instance instance,
+      [in] uint32_t promise_id,
+      [in] PP_Var web_session_id);
+
+  /**
+   * Get the key IDs for keys in the session that the CDM knows are currently
+   * usable to decrypt media data.
+   *
+   * @param[in] promise_id A reference for the promise that gets resolved or
+   * rejected depending upon the success or failure of obtaining the key IDs.
+   *
+   * @param[in] web_session_id A <code>PP_Var</code> of type
+   * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
+   * to be queried.
+   *
+   */
+  void GetUsableKeyIds(
+      [in] PP_Instance instance,
+      [in] uint32_t promise_id,
+      [in] PP_Var web_session_id);
 
   /**
    * Decrypts the block and returns the unencrypted block via