drm.h
上传用户:hjhsjcl
上传日期:2020-09-25
资源大小:11378k
文件大小:3k
源码类别:

压缩解压

开发平台:

C++ Builder

  1. /***********************************************************************************
  2. *
  3. *   Copyright (C) 2005 ALi Corporation. All Rights Reserved.
  4. *
  5. *   File:     drm.h
  6. *
  7. *   Contents:
  8. *
  9. *   History:
  10. *       Date              By         Reason
  11. *       ===========       ===========       ===========
  12. *       2005/1/17         Jeremy Jiang development
  13. *
  14. ************************************************************************************/
  15. #ifdef _DRM_H_
  16. #define EXTERN
  17. #else
  18. #define EXTERN extern
  19. #endif
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #ifndef uint8_t
  24. #define int8_t volatile char
  25. #define uint8_t volatile unsigned char
  26. #define uint16_t volatile unsigned int
  27. #define uint32_t volatile unsigned long
  28. #define addr_t volatile unsigned char xdata *
  29. #endif
  30. EXTERN XBYTE gbSecureClockState;
  31. #define DRM_SUCCESS _htonl(0x00000000L)  //The operation completed successfully. 
  32. #define DRM_S_FALSE  _htonl(0x00000001L) //The method succeeded and returned the Boolean value FALSE.
  33. #define DRM_E_FAIL  _htonl(0x80004005L) //An unspecified failure has occurred.
  34. #define DRM_E_INVALIDARG _htonl(0x80070057L) //A parameter is not valid or is a NULL pointer.  
  35. #define DRM_E_OUTOFMEMORY  _htonl(0x80000002L) //The method failed to allocate the necessary memory.
  36. #define DRM_E_FILENOTFOUND _htonl(0x80030002L) //The system cannot find the file specified. 
  37. #define DRM_E_BUFFERTOOSMALL _htonl(0x8007007AL) //A buffer is too small for the data. 
  38. #define DRM_E_NOTIMPL  _htonl(0x80004001L) //Not implemented.
  39. #define DRM_E_NOMORE _htonl(0x80070103L)   //The end of the enumeration, or no more data available. 
  40. //Chris061024 #2  start add for Metering 
  41. #define DSP_METER_STAGE 0x046E
  42. #define DSP_METER_DATALEN 0x046F
  43. #define DSP_METER_DATAIN 0x037C
  44. #define DSP_METER_ACK 0x0470
  45. #define DSP_METER_READ_INDEX 0x047D
  46. #define DSP_METER_SIGNATURE 0x0313
  47. #define DSP_METER_DATAOUT 0x1000
  48. #define DSP_METER_FORCE_ECC 0x2014
  49. #define DSP_METER_TEST 0x2014
  50. #define DSP_METER_ECC 0x05f5
  51. #define DSP_METER_ECC_SIZE 3232
  52. #define DSP_METER_SEED 0x0145
  53. //Chris061024 #2  end
  54. EXTERN void DrmGetSecureTimeChallenge(void) large;
  55. EXTERN void DrmGetSyncList(void) large;
  56. EXTERN void DrmSetLicenseResponse(void) large;
  57. EXTERN void DrmGetLicenseStat(void) large;
  58. EXTERN void DrmGetSecureClock(bit fValueOnly) large;
  59. EXTERN void DrmSaveSecurityTime(void); //David0600116#3 add new function for saving security colock
  60. EXTERN void DrmGetDeviceCertificate(bit fValueOnly) large;
  61. EXTERN API void DrmSetSecureTimeResponse(void) large; //David 050422
  62. EXTERN BOOL DrmMeterDspProcess(WORD wStage, WORD wLen, PBYTE pbData, WORD wECC) large;//Chris060904 add 
  63. EXTERN void TurnTextTime(DWORD *dwSetTime) large;
  64. EXTERN void TurnTimeText(DWORD dwGetTime) large;
  65. //Chris 060602
  66. EXTERN void DrmMeterChallenge(void) large;
  67. EXTERN XBYTE gxbStringEditTime[6]; // time string
  68. EXTERN XBYTE gxbStringEditDate[6]; // date string
  69. #ifdef __cplusplus
  70. }
  71. #endif
  72. #undef EXTERN