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.

76 lines
2.1 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. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. /**
  23. * SendNotification
  24. *
  25. * Description:
  26. * This function sends a broadcast message to the local machine. The
  27. * message is specified by aMsgId. The parameter anInterval specifies
  28. * the amount of time to wait between consecutive messages. If this
  29. * value is zero the message is only sent once, otherwise the message
  30. * will repeat until SendNotification(..) or CancelNotification() is
  31. * called. aDelay specifies that the message should be send aDelay
  32. * seconds in the future - note that this method will not block for aDelay
  33. * seconds, it returns immediately and sends the message on a separate
  34. * thread. Any current previously executing periodic notifications
  35. * are canceled as a result of this call.
  36. *
  37. * This method also keeps track of whether the power out message had
  38. * been sent to users. This is done in order to squelch a power return
  39. * message if a power out message had not already been sent.
  40. *
  41. * Parameters:
  42. * aMsgId - the message to send
  43. * anInterval - the amount of time, in seconds, between messages
  44. * aDelay - the amount of time, in seconds to wait to send message
  45. *
  46. * Returns:
  47. * nothing
  48. */
  49. void SendNotification(DWORD aMsgId, DWORD anInterval, DWORD aDelay);
  50. /**
  51. * CancelNotification
  52. *
  53. * Description:
  54. * This function cancels the periodic messaging initiated through a call
  55. * to the SendNotification(..) function.
  56. *
  57. * Parameters:
  58. * none
  59. *
  60. * Returns:
  61. * nothing
  62. */
  63. void CancelNotification();
  64. #ifdef __cplusplus
  65. }
  66. #endif
  67. #endif