' ########################################################################################
' Microsoft Windows
' File: drmexternals.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_drmexternals_PBI)
#DEFINE PBX_drmexternals_PBI
%EQUATE `DRMEXTERNALS_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/Media/wmdrmsdk.inc"
$$g_wszWMDRM_IsDRM = "IsDRM"$$
$$g_wszWMDRM_IsDRMCached = "IsDRMCached"$$
$$g_wszWMDRM_BaseLicenseAcqURL = "BaseLAURL"$$
$$g_wszWMDRM_Rights = "Rights"$$
$$g_wszWMDRM_LicenseID = "LID"$$
$$g_wszWMDRM_DRMHeader = "DRMHeader."$$
$$g_wszWMDRM_DRMHeader_KeyID = "DRMHeader.KID"$$
$$g_wszWMDRM_DRMHeader_LicenseAcqURL = "DRMHeader.LAINFO"$$
$$g_wszWMDRM_DRMHeader_ContentID = "DRMHeader.CID"$$
$$g_wszWMDRM_DRMHeader_IndividualizedVersion = "DRMHeader.SECURITYVERSION"$$
$$g_wszWMDRM_DRMHeader_ContentDistributor = "DRMHeader.ContentDistributor"$$
$$g_wszWMDRM_DRMHeader_SubscriptionContentID = "DRMHeader.SubscriptionContentID"$$
#IF NOT %DEF(%DRM_PLAYLIST_TYPES_DEFINED)
%EQUATE `DRM_PLAYLIST_TYPES_DEFINED = 1
%EQUATE `DRM_PLAYLIST_DATA_V2_VALID = &H00000001
%EQUATE `DRM_PLAYLIST_DATA_V1_VALID = &H00000002
%EQUATE `DRM_PLAYLIST_DATA_OTHER_VALID = &H00000004
%EQUATE `DRM_CANCEL_PLAYLIST_BURN = &H00000001
%EQUATE `DRM_COMMIT_PLAYLIST_BURN = &H00000002
' // Size = 23 bytes
TYPE DRM_PLAYLIST_CONTENT_ID DWORD
 lpcwszV2Header AS WSTRINGZ PTR
 lpcszV1KID AS ASCIIZ PTR
 pbOtherData AS BYTE PTR ' BYTE*
 cbOtherData AS DWORD
 dwUniqueIDForSession AS DWORD
 dwValidFields AS DWORD
END TYPE
#ENDIF ' // DRM_PLAYLIST_TYPES_DEFINED
' enum WMT_RIGHTS
%EQUATE `WMT_RIGHT_PLAYBACK = &H1
%EQUATE `WMT_RIGHT_COPY_TO_NON_SDMI_DEVICE = &H2
%EQUATE `WMT_RIGHT_COPY_TO_CD = &H8
%EQUATE `WMT_RIGHT_COPY_TO_SDMI_DEVICE = &H10
%EQUATE `WMT_RIGHT_ONE_TIME = &H20
%EQUATE `WMT_RIGHT_SAVE_STREAM_PROTECTED = &H40
%EQUATE `WMT_RIGHT_COPY = &H80
%EQUATE `WMT_RIGHT_COLLABORATIVE_PLAY = &H100
%EQUATE `WMT_RIGHT_SDMI_TRIGGER = &H10000
%EQUATE `WMT_RIGHT_SDMI_NOMORECOPIES = &H20000
%EQUATE `DRM_DEVICE_REGISTER_TYPE_STREAMING = &H00000001
%EQUATE `DRM_DEVICE_REGISTER_TYPE_STORAGE = &H00000002
#IF NOT %DEF(%DRM_PROTECTION_SCHEMES_DEFINED)
%EQUATE `DRM_PROTECTION_SCHEMES_DEFINED = 1
$WMDRM_PROTECTION_SCHEME_ACP = GUID$("{C3FD11C6-F8B7-4D20-B008-1DB17D61F2DA}")
$WMDRM_PROTECTION_SCHEME_MAX_VGA_RESOLUTION = GUID$("{D783A191-E083-4BAF-B2DA-E69F910B3772}")
$WMDRM_PROTECTION_SCHEME_MAX_COMPONENT_RESOLUTION = GUID$("{811C5110-46C8-4C6E-8163-C0482A15D47E}")
$WMDRM_PROTECTION_SCHEME_DOWNSAMPLE_REQUIRED = GUID$("{8F81A453-998C-4596-B150-F8486DF6F2E6}")
$WMDRM_PROTECTION_SCHEME_MAX_VGA_RESOLUTION_1 = GUID$("{D9619433-EC9F-489E-9E07-770DEDD8BD04}")
$WMDRM_PROTECTION_SCHEME_MAX_VGA_RESOLUTION_2 = GUID$("{A24F0A24-5C92-4737-9B21-A23E4FED322E}")
$WMDRM_PROTECTION_SCHEME_MAX_VGA_RESOLUTION_3 = GUID$("{C4DB4310-A1AE-422E-B7A7-21BC3473DA77}")
$WMDRM_PROTECTION_SCHEME_MAX_VGA_RESOLUTION_4 = GUID$("{E84E4D21-3B1C-44BC-A2EC-C48108587CAD}")
$WMDRM_PROTECTION_SCHEME_MAX_COMPONENT_RESOLUTION_1 = GUID$("{EC3A1C03-DD4E-47F7-BFE5-AEE753486671}")
$WMDRM_PROTECTION_SCHEME_MAX_COMPONENT_RESOLUTION_2 = GUID$("{327803CA-D914-4DA3-9728-E19E82BE8C25}")
$WMDRM_PROTECTION_SCHEME_MAX_COMPONENT_RESOLUTION_3 = GUID$("{36D9C83F-AF07-4727-AB74-CA6931BA69F3}")
$WMDRM_PROTECTION_SCHEME_MAX_COMPONENT_RESOLUTION_4 = GUID$("{9443D876-1D46-40CB-BDE5-9CC1464C9BAF}")
#ENDIF ' // DRM_PROTECTION_SCHEMES_DEFINED
#IF NOT %DEF(%DRM_WM_GET_LIC_DATA_DEFINED)
%EQUATE `DRM_WM_GET_LIC_DATA_DEFINED = 1
' // Size = 23 bytes
TYPE WM_GET_LICENSE_DATA DWORD
 dwSize AS DWORD
 hr AS LONG
 wszURL AS DWORD ' BSTR
 wszLocalFilename AS WSTRINGZ PTR ' WCHAR*
 pbPostData AS BYTE PTR ' BYTE*
 dwPostDataSize AS DWORD
END TYPE
MACRO WMGetLicenseData = WM_GET_LICENSE_DATA
#ENDIF ' // DRM_WM_GET_LIC_DATA_DEFINED
%EQUATE `WMDRM_KEYTYPE_RC4 = 0
%EQUATE `WMDRM_KEYTYPE_COCKTAIL = 1
#IF NOT %DEF(%WMDRM_IMPORT_SESSION_KEY_DEFINED)
%EQUATE `WMDRM_IMPORT_SESSION_KEY_DEFINED = 1
' // Size = 12 bytes
TYPE WMDRM_IMPORT_SESSION_KEY DWORD
 dwKeyType AS DWORD
 cbKey AS DWORD
 rgbKey(0) AS BYTE ' BYTE[1]
END TYPE
#ENDIF ' // WMDRM_IMPORT_SESSION_KEY_DEFINED
#IF NOT %DEF(%WMDRM_IMPORT_CONTENT_KEY_DEFINED)
%EQUATE `WMDRM_IMPORT_CONTENT_KEY_DEFINED = 1
' // Size = 28 bytes
TYPE WMDRM_IMPORT_CONTENT_KEY DWORD
 dwVersion AS DWORD
 cbStructSize AS DWORD
 dwIVKeyType AS DWORD
 cbIVKey AS DWORD
 dwContentKeyType AS DWORD
 cbContentKey AS DWORD
 rgbKeyData(0) AS BYTE ' BYTE
END TYPE
#ENDIF ' // WMDRM_IMPORT_CONTENT_KEY_DEFINED
#IF NOT %DEF(%WMDRM_IMPORT_INIT_STRUCT_DEFINED)
%EQUATE `WMDRM_IMPORT_INIT_STRUCT_DEFINED = 1
' // Size = 20 bytes
TYPE WMDRM_IMPORT_INIT_STRUCT DWORD
 dwVersion AS DWORD
 cbEncryptedSessionKeyMessage AS DWORD
 pbEncryptedSessionKeyMessage AS BYTE PTR ' BYTE*
 cbEncryptedKeyMessage AS DWORD
 pbEncryptedKeyMessage AS BYTE PTR ' BYTE*
END TYPE
#ENDIF ' // WMDRM_IMPORT_INIT_STRUCT_DEFINED
#ENDIF
