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.

56 lines
1.3 KiB

  1. //***********************************************
  2. //
  3. // Resultant set of policy
  4. //
  5. // Microsoft Confidential
  6. // Copyright (c) Microsoft Corporation 1995
  7. // All rights reserved
  8. //
  9. // History: 7-Jun-99 NishadM Created
  10. //
  11. //*************************************************************
  12. #ifndef _INDICATE_H_
  13. #define _INDICATE_H_
  14. #include <wbemcli.h>
  15. #include "smartptr.h"
  16. class CProgressIndicator
  17. {
  18. public:
  19. CProgressIndicator( IWbemObjectSink* pObjectSink, // response handler
  20. bool fIntermediateStatus = FALSE, // need intermediate status
  21. unsigned long ulNumer = 0,
  22. unsigned long ulDenom = 100
  23. );
  24. ~CProgressIndicator();
  25. HRESULT
  26. IncrementBy( unsigned long ulPercent );
  27. HRESULT
  28. SetComplete();
  29. unsigned long
  30. CurrentProgress() { return m_ulNumerator; };
  31. unsigned long
  32. MaxProgress() { return m_ulDenominator; };
  33. inline bool
  34. IsValid() { return m_fIsValid; };
  35. private:
  36. unsigned long m_ulNumerator;
  37. unsigned long m_ulDenominator;
  38. XInterface<IWbemObjectSink> m_xObjectSink;
  39. bool m_fIsValid;
  40. bool m_fIntermediateStatus;
  41. };
  42. #endif // _INDICATE_H_