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.

80 lines
2.2 KiB

  1. /* Copyright 1999 American Power Conversion, All Rights Reserved
  2. *
  3. * Description:
  4. * The file defines the interface to the Notifier. The
  5. * Notifier is reponsible for broadcasting power-related and
  6. * shutdown messages to the local machine.
  7. *
  8. *
  9. * Revision History:
  10. * sberard 30Mar1999 initial revision.
  11. *
  12. */
  13. #include <windows.h>
  14. #include <lmcons.h>
  15. #include <lmalert.h>
  16. #include <lmmsg.h>
  17. #ifndef _NOTIFIER_H
  18. #define _NOTIFIER_H
  19. #ifndef _ASSERT
  20. #define _ASSERT(x)
  21. #endif
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /**
  26. * SendNotification
  27. *
  28. * Description:
  29. * This function sends a broadcast message to the local machine. The
  30. * message is specified by aMsgId. The parameter anInterval specifies
  31. * the amount of time to wait between consecutive messages. If this
  32. * value is zero the message is only sent once, otherwise the message
  33. * will repeat until SendNotification(..) or CancelNotification() is
  34. * called. aDelay specifies that the message should be send aDelay
  35. * seconds in the future - note that this method will not block for aDelay
  36. * seconds, it returns immediately and sends the message on a separate
  37. * thread. Any current previously executing periodic notifications
  38. * are canceled as a result of this call.
  39. *
  40. * This method also keeps track of whether the power out message had
  41. * been sent to users. This is done in order to squelch a power return
  42. * message if a power out message had not already been sent.
  43. *
  44. * Parameters:
  45. * aMsgId - the message to send
  46. * anInterval - the amount of time, in seconds, between messages
  47. * aDelay - the amount of time, in seconds to wait to send message
  48. *
  49. * Returns:
  50. * nothing
  51. */
  52. void SendNotification(DWORD aMsgId, DWORD anInterval, DWORD aDelay);
  53. /**
  54. * CancelNotification
  55. *
  56. * Description:
  57. * This function cancels the periodic messaging initiated through a call
  58. * to the SendNotification(..) function.
  59. *
  60. * Parameters:
  61. * none
  62. *
  63. * Returns:
  64. * nothing
  65. */
  66. void CancelNotification();
  67. #ifdef __cplusplus
  68. }
  69. #endif
  70. #endif