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.

120 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. fmifsmsg.hxx
  5. Abstract:
  6. This class is an implementation of the MESSAGE class which uses
  7. an FMIFS callback function as its means of communicating results.
  8. Author:
  9. Norbert P. Kusters (norbertk) 9-Mar-92
  10. --*/
  11. #if !defined( _FMIFS_MESSAGE_DEFN_ )
  12. #define _FMIFS_MESSAGE_DEFN_
  13. #include "message.hxx"
  14. #include "fmifs.h"
  15. DECLARE_CLASS( FMIFS_MESSAGE );
  16. class FMIFS_MESSAGE : public MESSAGE {
  17. public:
  18. DECLARE_CONSTRUCTOR( FMIFS_MESSAGE );
  19. VIRTUAL
  20. ~FMIFS_MESSAGE(
  21. );
  22. VIRTUAL
  23. BOOLEAN
  24. Initialize(
  25. IN FMIFS_CALLBACK CallBack
  26. );
  27. VIRTUAL
  28. BOOLEAN
  29. Set(
  30. IN MSGID MsgId,
  31. IN MESSAGE_TYPE MessageType DEFAULT NORMAL_MESSAGE,
  32. IN ULONG MessageVisual DEFAULT NORMAL_VISUAL
  33. );
  34. VIRTUAL
  35. BOOLEAN
  36. DisplayV(
  37. IN PCSTR Format,
  38. IN va_list VarPointer
  39. );
  40. VIRTUAL
  41. PMESSAGE
  42. Dup(
  43. );
  44. protected:
  45. MESSAGE_TYPE _msgtype;
  46. ULONG _msgvisual;
  47. FMIFS_CALLBACK _callback;
  48. ULONG _kilobytes_total_disk_space;
  49. ULONG _values_in_mb;
  50. private:
  51. NONVIRTUAL
  52. VOID
  53. Construct(
  54. );
  55. NONVIRTUAL
  56. VOID
  57. Destroy(
  58. );
  59. };
  60. INLINE
  61. BOOLEAN
  62. FMIFS_MESSAGE::Set(
  63. IN MSGID MsgId,
  64. IN MESSAGE_TYPE MessageType,
  65. IN ULONG MessageVisual
  66. )
  67. /*++
  68. Routine Description:
  69. This routine sets up the class to display the message with the 'MsgId'
  70. resource identifier.
  71. Arguments:
  72. MsgId - Supplies the resource message id.
  73. Return Value:
  74. FALSE - Failure.
  75. TRUE - Success.
  76. --*/
  77. {
  78. SetMessageId(MsgId);
  79. _msgtype = MessageType;
  80. _msgvisual = MessageVisual;
  81. return TRUE;
  82. }
  83. #endif // _FMIFS_MESSAGE_DEFN_