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.

107 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. wpipm.hxx
  5. Abstract:
  6. Contains the WPIPM class that handles communication with
  7. the admin service. WPIPM responds to pings, and tells
  8. the process when to shut down.
  9. Author:
  10. Michael Courage (MCourage) 22-Feb-1999
  11. Revision History:
  12. --*/
  13. #ifndef _WP_IPM_HXX_
  14. #define _WP_IPM_HXX_
  15. #include "ipm.hxx"
  16. class WP_CONTEXT;
  17. class WP_IPM
  18. : public MESSAGE_LISTENER
  19. {
  20. public:
  21. WP_IPM()
  22. : m_pWpContext(NULL),
  23. m_pMessageGlobal(NULL),
  24. m_pPipe(NULL),
  25. m_hTerminateEvent(NULL),
  26. m_hConnectEvent(NULL)
  27. {}
  28. HRESULT
  29. Initialize(
  30. WP_CONTEXT * pWpContext
  31. );
  32. HRESULT
  33. Terminate(
  34. VOID
  35. );
  36. //
  37. // MESSAGE_LISTENER methods
  38. //
  39. virtual
  40. HRESULT
  41. AcceptMessage(
  42. IN const MESSAGE * pPipeMessage
  43. );
  44. virtual
  45. HRESULT
  46. PipeConnected(
  47. VOID
  48. );
  49. virtual
  50. HRESULT
  51. PipeDisconnected(
  52. IN HRESULT hr
  53. );
  54. HRESULT
  55. SendMsgToAdminProcess(
  56. IPM_WP_SHUTDOWN_MSG reason
  57. );
  58. HRESULT
  59. HandleCounterRequest(
  60. VOID
  61. );
  62. HRESULT
  63. SendInitCompleteMessage(
  64. HRESULT hrToSend
  65. );
  66. private:
  67. HRESULT
  68. HandlePing(
  69. VOID
  70. );
  71. HRESULT
  72. HandleShutdown(
  73. BOOL fImmediate
  74. );
  75. WP_CONTEXT * m_pWpContext;
  76. MESSAGE_GLOBAL * m_pMessageGlobal;
  77. MESSAGE_PIPE * m_pPipe;
  78. HANDLE m_hConnectEvent;
  79. HANDLE m_hTerminateEvent;
  80. };
  81. #endif // _WP_IPM_HXX_