Source code of Windows XP (NT5)
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.

136 lines
5.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1997.
  5. //
  6. // File: cliprot.h
  7. //
  8. // Contents: Contains different client states and client protocol
  9. // related definitions
  10. //
  11. // Classes:
  12. //
  13. // Functions:
  14. //
  15. // History: 12-23-97 v-sbhatt Created
  16. //
  17. //----------------------------------------------------------------------------
  18. #ifndef _CLIPROT_H_
  19. #define _CLIPROT_H
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. //Different states for client state machine
  24. #define LICENSE_CLIENT_STATE_WAIT_SERVER_HELLO 0x00 //Initial state of the machine
  25. #define LICENSE_CLIENT_STATE_KEY_EXCHANGE_INFO 0x01 //Client key exchange info
  26. #define LICENSE_CLIENT_STATE_LICENSE_RESPONSE 0x02 //License info
  27. #define LICENSE_CLIENT_STATE_NEW_LICENSE_REQUEST 0x03 //Client asked for a new license
  28. #define LICENSE_CLIENT_STATE_PLATFORM_INFO 0x04 //Platform info
  29. #define LICENSE_CLIENT_STATE_PLATFORM_CHALLENGE_RESPONSE 0x05 //Platform challenge response
  30. #define LICENSE_CLIENT_STATE_ERROR 0x06 //Error state
  31. #define LICENSE_CLIENT_STATE_ABORT 0x07 //Total abort;
  32. #define LICENSE_CLIENT_STATE_DONE 0x08
  33. LICENSE_STATUS
  34. CALL_TYPE
  35. LicenseClientHandleServerMessage(
  36. PLicense_Client_Context pContext,
  37. UINT32 *puiExtendedErrorInfo,
  38. BYTE FAR * pbInput,
  39. DWORD cbInput,
  40. BYTE FAR * pbOutput,
  41. DWORD FAR * pcbOutput
  42. );
  43. LICENSE_STATUS
  44. CALL_TYPE
  45. LicenseClientHandleServerError(
  46. PLicense_Client_Context pContext,
  47. PLicense_Error_Message pCanonical,
  48. UINT32 *puiExtendedErrorInfo,
  49. BYTE FAR * pbMessage,
  50. DWORD FAR * pcbMessage
  51. );
  52. LICENSE_STATUS
  53. CALL_TYPE
  54. LicenseClientHandleServerRequest(
  55. PLicense_Client_Context pContext,
  56. PHydra_Server_License_Request pCanonical,
  57. BOOL fNewLicense,
  58. BYTE FAR * pbMessage,
  59. DWORD FAR * pcbMessage,
  60. BOOL fSupportExtendedError
  61. );
  62. LICENSE_STATUS
  63. CALL_TYPE
  64. LicenseClientHandleServerPlatformChallenge(
  65. PLicense_Client_Context pContext,
  66. PHydra_Server_Platform_Challenge pCanonical,
  67. BYTE FAR * pbMessage,
  68. DWORD FAR * pcbMessage,
  69. BOOL fSupportExtendedError
  70. );
  71. LICENSE_STATUS
  72. CALL_TYPE
  73. LicenseClientHandleNewLicense(
  74. PLicense_Client_Context pContext,
  75. PHydra_Server_New_License pCanonical,
  76. BOOL fNew,
  77. BYTE FAR * pbMessage,
  78. DWORD FAR * pcbMessage
  79. );
  80. LICENSE_STATUS
  81. CALL_TYPE
  82. ClientConstructLicenseInfo(
  83. PLicense_Client_Context pContext,
  84. BYTE FAR * pbInput,
  85. DWORD cbInput,
  86. BYTE FAR * pbOutput,
  87. DWORD FAR * pcbOutput,
  88. BOOL fExtendedError
  89. );
  90. LICENSE_STATUS
  91. CALL_TYPE
  92. ClientConstructNewLicenseRequest(
  93. PLicense_Client_Context pContext,
  94. BYTE FAR * pbOutput,
  95. DWORD FAR * pcbOutput,
  96. BOOL fExtendedError
  97. );
  98. LICENSE_STATUS
  99. CALL_TYPE
  100. ClientConstructErrorAlert(
  101. PLicense_Client_Context pContext,
  102. DWORD dwErrorCode,
  103. DWORD dwStateTransition,
  104. BYTE FAR * pbErrorInfo,
  105. DWORD cbErrorInfo,
  106. BYTE FAR * pbOutput,
  107. DWORD FAR * pcbOutput,
  108. BOOL fExtendedError
  109. );
  110. LICENSE_STATUS
  111. CALL_TYPE
  112. ClientGenerateChallengeResponse(
  113. PLicense_Client_Context pContext,
  114. PBinary_Blob pChallengeData,
  115. PBinary_Blob pResponseData
  116. );
  117. #ifdef __cplusplus
  118. }
  119. #endif
  120. #endif //_CLIPROT_H_