You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
180 lines
6.8 KiB
180 lines
6.8 KiB
//+-------------------------------------------------------------------------
|
|
//
|
|
// Microsoft Windows Media Technologies
|
|
// Copyright (C) Microsoft Corporation, 1999 - 2001. All Rights Reserved.
|
|
//
|
|
// File: drmexternals.idl
|
|
//
|
|
// Contents: enums and typedefs needed for using microsoft drm.
|
|
// !!!THIS FILE NEEDS TO BE DROPPED TO SDK\IDL DIRECTORY WHENEVER CHANGED!!!
|
|
//--------------------------------------------------------------------------
|
|
import "oaidl.idl";
|
|
|
|
// The following is a partial list of DRM (v7 or greater) actions that are of interest to applications.
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_RIGHT_PLAYBACK = L\"Play\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_RIGHT_COPY_TO_CD = L\"Print.redbook\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_RIGHT_COPY_TO_SDMI_DEVICE = L\"Transfer.SDMI\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_RIGHT_COPY_TO_NON_SDMI_DEVICE = L\"Transfer.NONSDMI\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_RIGHT_BACKUP = L\"Backup\";" )
|
|
|
|
// Property prefix for getting header/license information
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_ActionAllowed = L\"ActionAllowed.\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_LicenseState = L\"LicenseStateData.\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_DRMHeader = L\"DRMHeader.\";" )
|
|
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_IsDRM = L\"IsDRM\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_IsDRMCached = L\"IsDRMCached\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_ActionAllowed_Playback = L\"ActionAllowed.Play\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_ActionAllowed_CopyToCD = L\"ActionAllowed.Print.redbook\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_ActionAllowed_CopyToSDMIDevice = L\"ActionAllowed.Transfer.SDMI\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_ActionAllowed_CopyToNonSDMIDevice = L\"ActionAllowed.Transfer.NONSDMI\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_ActionAllowed_Backup = L\"ActionAllowed.Backup\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_LicenseState_Playback = L\"LicenseStateData.Play\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_LicenseState_CopyToCD = L\"LicenseStateData.Print.redbook\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_LicenseState_CopyToSDMIDevice = L\"LicenseStateData.Transfer.SDMI\";" )
|
|
cpp_quote( "static const WCHAR *g_wszWMDRM_LicenseState_CopyToNonSDMIDevice = L\"LicenseStateData.Transfer.NONSDMI\";" )
|
|
|
|
// This enum indicates the category for each possible output string to be displayed.
|
|
// 0 - Playback not permitted.
|
|
// 1 - Playback valid 5 times.
|
|
// 2 - Playback valid from 7/12/00.
|
|
// 3 - Playback valid until 7/12/00.
|
|
// 4 - Playback valid from 5/12 to 9/12.
|
|
// 5 - Playback valid 5 times from 7/12/00.
|
|
// 6 - Playback valid 5 times until 7/12/00.
|
|
// 7 - Playback valid 5 times from 5/12 to 9/12.
|
|
// 8 - Playback valid for 24 hours from first use.
|
|
|
|
typedef enum DRM_LICENSE_STATE_CATEGORY
|
|
{
|
|
WM_DRM_LICENSE_STATE_NORIGHT = 0,
|
|
WM_DRM_LICENSE_STATE_UNLIM,
|
|
|
|
WM_DRM_LICENSE_STATE_COUNT,
|
|
WM_DRM_LICENSE_STATE_FROM,
|
|
WM_DRM_LICENSE_STATE_UNTIL,
|
|
WM_DRM_LICENSE_STATE_FROM_UNTIL,
|
|
WM_DRM_LICENSE_STATE_COUNT_FROM,
|
|
WM_DRM_LICENSE_STATE_COUNT_UNTIL,
|
|
WM_DRM_LICENSE_STATE_COUNT_FROM_UNTIL,
|
|
WM_DRM_LICENSE_STATE_EXPIRATION_AFTER_FIRSTUSE
|
|
} DRM_LICENSE_STATE_CATEGORY;
|
|
|
|
typedef struct _DRM_LICENSE_STATE_DATA
|
|
{
|
|
DWORD dwStreamId; // 0 => All streams != 0 => For a particular stream.
|
|
DRM_LICENSE_STATE_CATEGORY dwCategory; // indicates the category of string to be displayed.
|
|
DWORD dwNumCounts; // Number of items supplied in dwCount
|
|
DWORD dwCount[4]; // Up to 4 counts
|
|
DWORD dwNumDates; // Number of items supplied in dwDate.
|
|
FILETIME datetime[4]; // Up to 4 dates.
|
|
DWORD dwVague; // 0 => certain 1 => atleast (there could be more licenses. Aggregation not possible).
|
|
} DRM_LICENSE_STATE_DATA;
|
|
|
|
|
|
typedef enum DRM_HTTP_STATUS
|
|
{
|
|
HTTP_NOTINITIATED = 0,
|
|
HTTP_CONNECTING,
|
|
HTTP_REQUESTING,
|
|
HTTP_RECEIVING,
|
|
HTTP_COMPLETED
|
|
} DRM_HTTP_STATUS;
|
|
|
|
// The various states individualization can be in:
|
|
typedef enum DRM_INDIVIDUALIZATION_STATUS
|
|
{
|
|
INDI_UNDEFINED = 0x0000,
|
|
INDI_BEGIN = 0x0001,
|
|
INDI_SUCCEED = 0x0002,
|
|
INDI_FAIL = 0x0004,
|
|
INDI_CANCEL = 0x0008,
|
|
INDI_DOWNLOAD = 0x0010,
|
|
INDI_INSTALL = 0x0020
|
|
} DRM_INDIVIDUALIZATION_STATUS;
|
|
|
|
typedef struct _WMIndividualizeStatus
|
|
{
|
|
HRESULT hr;
|
|
DRM_INDIVIDUALIZATION_STATUS enIndiStatus;
|
|
LPSTR pszIndiRespUrl;
|
|
DWORD dwHTTPRequest;
|
|
DRM_HTTP_STATUS enHTTPStatus;
|
|
DWORD dwHTTPReadProgress;
|
|
DWORD dwHTTPReadTotal;
|
|
} WM_INDIVIDUALIZE_STATUS;
|
|
|
|
typedef struct _WMGetLicenseData
|
|
{
|
|
DWORD dwSize;
|
|
HRESULT hr;
|
|
WCHAR *wszURL;
|
|
WCHAR *wszLocalFilename;
|
|
BYTE *pbPostData;
|
|
DWORD dwPostDataSize;
|
|
} WM_GET_LICENSE_DATA;
|
|
|
|
typedef enum MSDRM_STATUS
|
|
{
|
|
DRM_ERROR = 0,
|
|
DRM_INFORMATION = 1,
|
|
DRM_BACKUPRESTORE_BEGIN = 2,
|
|
DRM_BACKUPRESTORE_END = 3,
|
|
DRM_BACKUPRESTORE_CONNECTING = 4,
|
|
DRM_BACKUPRESTORE_DISCONNECTING = 5,
|
|
DRM_ERROR_WITHURL = 6,
|
|
DRM_RESTRICTED_LICENSE = 7,
|
|
DRM_NEEDS_INDIVIDUALIZATION = 8
|
|
} MSDRM_STATUS;
|
|
|
|
//
|
|
// Attribute datatypes.
|
|
//
|
|
typedef enum DRM_ATTR_DATATYPE
|
|
{
|
|
|
|
DRM_TYPE_DWORD = 0,
|
|
DRM_TYPE_STRING = 1,
|
|
DRM_TYPE_BINARY = 2,
|
|
DRM_TYPE_BOOL = 3,
|
|
DRM_TYPE_QWORD = 4,
|
|
DRM_TYPE_WORD = 5,
|
|
DRM_TYPE_GUID = 6,
|
|
|
|
} DRM_ATTR_DATATYPE;
|
|
|
|
interface IDRMStatusCallback;
|
|
|
|
cpp_quote( "#define DRM_BACKUP_OVERWRITE ((DWORD) 0x00000001)" )
|
|
cpp_quote( "#define DRM_RESTORE_INDIVIDUALIZE ((DWORD) 0x00000002)" )
|
|
|
|
[
|
|
object,
|
|
uuid( 08548704-75B1-4982-9B26-FB385DEE741D ),
|
|
helpstring("IDRMStatusCallback Interface"),
|
|
pointer_default(unique),
|
|
local
|
|
]
|
|
|
|
interface IDRMStatusCallback : IUnknown
|
|
{
|
|
//
|
|
// The contents pParam depends on the Status.
|
|
//
|
|
HRESULT OnStatus( [in] MSDRM_STATUS Status,
|
|
[in] HRESULT hr,
|
|
[in] DRM_ATTR_DATATYPE dwType,
|
|
[in] BYTE *pValue,
|
|
[in] void *pvContext );
|
|
};
|
|
|
|
// drmbuf
|
|
cpp_quote("#define DRM_ENCRYPT_CONTENT_ASFv1 0x1001")
|
|
cpp_quote("#define DRM_ENCRYPT_CONTENT_ASFv2 0x1002")
|
|
|
|
typedef struct _DRMBUF {
|
|
unsigned long len;
|
|
char *buf;
|
|
} DRMBUF, *PDRMBUF;
|
|
|
|
|