Leaked source code of windows server 2003
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.

110 lines
2.3 KiB

  1. #ifndef __SSLCONFIGCHANGEPROVCLIENT__HXX_
  2. #define __SSLCONFIGCHANGEPROVCLIENT__HXX_
  3. /*++
  4. Copyright (c) 2001 Microsoft Corporation
  5. Module Name :
  6. sslconfigchangeprovclient.hxx
  7. Abstract:
  8. SSL CONFIG CHANGE PROV client
  9. Receives SSL configuration change parameters detected by server side
  10. User of this class shold inherit it class and implement
  11. PipeListener() to process notifications
  12. Author:
  13. Jaroslav Dunajsky April-24-2001
  14. Environment:
  15. Win32 - User Mode
  16. Project:
  17. Stream Filter Worker Process
  18. --*/
  19. #include <sslconfigpipe.hxx>
  20. #include <sslconfigcommon.hxx>
  21. //
  22. // SSL Configuration change callback function
  23. //
  24. typedef VOID SSL_CONFIG_CHANGE_CALLBACK (
  25. PVOID lpParameter,
  26. SSL_CONFIG_CHANGE_COMMAND_ID ConfigChangeType,
  27. DWORD dwSiteId
  28. );
  29. class SSL_CONFIG_CHANGE_PROV_CLIENT: protected SSL_CONFIG_PIPE
  30. {
  31. public:
  32. SSL_CONFIG_CHANGE_PROV_CLIENT()
  33. :_pSslConfigChangeCallback( NULL ),
  34. _pSslConfigChangeCallbackParameter( NULL ),
  35. _fConnected( FALSE )
  36. {}
  37. ~SSL_CONFIG_CHANGE_PROV_CLIENT()
  38. {}
  39. HRESULT
  40. StartListeningForChanges(
  41. IN SSL_CONFIG_CHANGE_CALLBACK * pSslConfigChangeCallback,
  42. IN OPTIONAL PVOID pvParam = NULL
  43. );
  44. HRESULT
  45. StopListeningForChanges(
  46. VOID
  47. );
  48. BOOL
  49. IsConnected(
  50. VOID
  51. )
  52. {
  53. return _fConnected;
  54. }
  55. protected:
  56. virtual
  57. HRESULT
  58. PipeListener(
  59. VOID
  60. );
  61. virtual
  62. BOOL
  63. QueryEnablePipeListener(
  64. VOID
  65. )
  66. {
  67. //
  68. // enable launching PipeListener() on private thread
  69. // during Initialize() call
  70. //
  71. return TRUE;
  72. }
  73. private:
  74. SSL_CONFIG_CHANGE_PROV_CLIENT( const SSL_CONFIG_CHANGE_PROV_CLIENT& );
  75. SSL_CONFIG_CHANGE_PROV_CLIENT& operator=( const SSL_CONFIG_CHANGE_PROV_CLIENT& );
  76. SSL_CONFIG_CHANGE_CALLBACK * _pSslConfigChangeCallback;
  77. PVOID _pSslConfigChangeCallbackParameter;
  78. //
  79. // Flag indicating the pipe connection is still OK
  80. //
  81. BOOL _fConnected;
  82. };
  83. #endif