DrmTypeDefs.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:3k
源码类别:

DVD

开发平台:

Others

  1. /*********************************************************************
  2.    Copyright (c) 2000 ZORAN Corporation, All Rights Reserved
  3.    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
  4.    File name:   DrmTypeDefs.h
  5.    File Type:   h File
  6.    Module:      System
  7.    Description:
  8.    Created:     Wed, 21.1.2004
  9. *********************************************************************/
  10. #ifndef _DRM_TYPE_DEFS_H_
  11. #define _DRM_TYPE_DEFS_H_
  12. #include "Config.h" // Global Configuration - do not remove!
  13. #ifdef AVI_DRM_SUPPORT
  14. #include "PlaycoreNav_ClipsAviDrmlibDrmCommonportable.h"
  15. #include "PlaycoreNav_ClipsAviDrmlibDrmCommonDrmSizes.h"
  16. // Key Source Modes
  17. #define KEY_SOURCE_MODE_BASE_FLAGS    0x0001
  18. #define KEY_SOURCE_MODE_CONNECTED_FLAGS 0x0002
  19. #define KEY_SOURCE_MODE_DISCONNECTED_FLAGS 0x0004
  20. // DRM Modes
  21. #define DRM_TYPE_BASE 0xF0F0
  22. #define DRM_TYPE_ACTIVATION_PURCHASE 0xC3C3
  23. #define DRM_TYPE_ACTIVATION_RENTAL 0x3C3C
  24. #define DRM_TYPE_PURCHASE 0x5555
  25. #define DRM_TYPE_RENTAL 0xAAAA
  26. // Use Limits.
  27. #define USE_LIMIT_ID_UNLIMITED 0x0707
  28. #define USE_LIMIT_ID_ONE 0x1001
  29. #define USE_LIMIT_ID_THREE 0x3003
  30. #define USE_LIMIT_ID_FIVE 0x5005
  31. #define USE_LIMIT_ID_SEVEN 0x7007
  32. #define USE_LIMIT_ID_TEN 0xAAAA
  33. #define USE_LIMIT_ID_TWENTY 0x5555
  34. #define USE_LIMIT_ID_THIRTY 0xF0F0
  35. typedef struct DrmUseLimitIdInfoStruct
  36. {
  37.     uint16_t id;
  38.     uint8_t uses;
  39. } DrmUseLimitIdInfo;
  40. typedef struct DrmActivateRecordStruct
  41. {
  42. uint8_t memoryGuard[OWNER_GUARD_BYTES];
  43. uint8_t modelId[MODEL_ID_BYTES];
  44. uint8_t userKey[KEY_SIZE_BYTES];
  45. uint8_t reserved[3];
  46. } DrmActivateRecord;
  47. typedef struct DrmRentalRecordStruct
  48. {
  49. uint16_t useLimitId;
  50. uint8_t serialNumber[SLOT_SERIAL_NUMBER_BYTES];
  51. uint8_t slotNumber;
  52. uint8_t reserved[3];
  53. } DrmRentalRecord;
  54. typedef struct DrmAdpTargetHeaderStruct
  55. {
  56. uint16_t drmMode;
  57. uint8_t userId[OWNER_USER_ID_BYTES];
  58. uint8_t reservedAlign;
  59.     DrmRentalRecord rentalRecord;
  60. uint8_t sessionKey[KEY_SIZE_BYTES];
  61. DrmActivateRecord activateRecord;
  62. uint8_t reserved[DRM_ADP_RESERVED];
  63. } DrmAdpTargetHeader;
  64. typedef struct DrmTransactionInfoHeaderStruct
  65. {
  66. uint8_t transactionId[TRANSACTION_ID_BYTES];
  67. uint16_t transactionAuthorityId;
  68. uint32_t contentId;
  69. uint8_t reserved[DRM_OTHER_RESERVED];
  70. } DrmTransactionInfoHeader;
  71. typedef struct DrmHeaderStruct
  72. {
  73. uint32_t keySourceMode;
  74. uint8_t masterKeyId[DRM_PORTABLE_KEY_LENGTH];
  75. DrmAdpTargetHeader adpTarget;
  76. DrmTransactionInfoHeader transaction;
  77. #ifndef AVI_MALLOC_SIZE_DOWN
  78. uint8_t frameKeys[DRM_FRAME_KEY_COUNT][KEY_SIZE_BYTES];
  79. #endif
  80. } DrmHeader;
  81. // DRM Playback Context States
  82. #define DRM_STATE_INITIALIZED 1
  83. #define DRM_STATE_RENTAL_QUERIED 2
  84. #define DRM_STATE_COMMITTED 3
  85. typedef struct DrmPlaybackContextStruct
  86. {
  87. DrmHeader clearHeader;
  88. uint8_t state;
  89. } DrmPlaybackContext;
  90. #endif //AVI_DRM_SUPPORT
  91. #endif //_DRM_TYPE_DEFS_H_