1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 * Use of this source code is governed by a BSD-style license that can be 3 * found in the LICENSE file. 4 */ 5 6 /* From private/ppb_flash_drm.idl modified Sat Jun 8 16:45:26 2013. */ 7 8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_DRM_H_ 9 #define PPAPI_C_PRIVATE_PPB_FLASH_DRM_H_ 10 11 #include "ppapi/c/pp_bool.h" 12 #include "ppapi/c/pp_completion_callback.h" 13 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_macros.h" 15 #include "ppapi/c/pp_resource.h" 16 #include "ppapi/c/pp_stdint.h" 17 #include "ppapi/c/pp_var.h" 18 19 #define PPB_FLASH_DRM_INTERFACE_1_0 "PPB_Flash_DRM;1.0" 20 #define PPB_FLASH_DRM_INTERFACE PPB_FLASH_DRM_INTERFACE_1_0 21 22 /** 23 * @file 24 * This file contains the <code>PPB_Flash_DRM</code> interface. 25 */ 26 27 28 /** 29 * @addtogroup Interfaces 30 * @{ 31 */ 32 /** 33 * A resource for performing Flash DRM-related operations. 34 */ 35 struct PPB_Flash_DRM_1_0 { 36 /** 37 * Creates a PPB_Flash_DRM resource for performing DRM-related operations in 38 * Flash. 39 */ 40 PP_Resource (*Create)(PP_Instance instance); 41 /** 42 * Asynchronously computes the device ID. When available, it will place the 43 * string in |*id| and will call the completion callback. On failure the 44 * given var will be PP_VARTYPE_UNDEFINED. 45 */ 46 int32_t (*GetDeviceID)(PP_Resource drm, 47 struct PP_Var* id, 48 struct PP_CompletionCallback callback); 49 /** 50 * Windows only. Synchronously outputs the HMONITOR corresponding to the 51 * monitor on which the plugin instance is displayed in |hmonitor|. PP_TRUE is 52 * returned on success. 53 */ 54 PP_Bool (*GetHmonitor)(PP_Resource drm, int64_t* hmonitor); 55 /** 56 * Asynchronously returns a PPB_FileRef resource in |file_ref| which points to 57 * the Voucher file for performing DRM verification. |callback| will be called 58 * upon completion. 59 */ 60 int32_t (*GetVoucherFile)(PP_Resource drm, 61 PP_Resource* file_ref, 62 struct PP_CompletionCallback callback); 63 }; 64 65 typedef struct PPB_Flash_DRM_1_0 PPB_Flash_DRM; 66 /** 67 * @} 68 */ 69 70 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_DRM_H_ */ 71 72