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.

46 lines
1.3 KiB

  1. //==========================================================================;
  2. //
  3. // closedcaptioningimpl.h : additional infrastructure to support implementing IMSVidClosedCaptionings
  4. // nicely from c++
  5. // Copyright (c) Microsoft Corporation 1999.
  6. //
  7. /////////////////////////////////////////////////////////////////////////////
  8. #pragma once
  9. #ifndef CLOSEDCAPTIONINGIMPL_H
  10. #define CLOSEDCAPTIONINGIMPL_H
  11. #include "featureimpl.h"
  12. namespace MSVideoControl {
  13. template<class T, LPCGUID LibID, LPCGUID KSCategory, class MostDerivedInterface = IMSVidClosedCaptioning>
  14. class DECLSPEC_NOVTABLE IMSVidClosedCaptioningImpl : public IMSVidFeatureImpl<T, LibID, KSCategory, MostDerivedInterface> {
  15. public:
  16. IMSVidClosedCaptioningImpl() : m_fCCEnable(false) {}
  17. bool m_fCCEnable;
  18. STDMETHOD(put_Enable)(VARIANT_BOOL fEnable) {
  19. m_fCCEnable = (fEnable == VARIANT_TRUE);
  20. return NOERROR;
  21. }
  22. STDMETHOD(get_Enable)(VARIANT_BOOL *pfEnable) {
  23. if (!pfEnable) {
  24. return E_POINTER;
  25. }
  26. try {
  27. *pfEnable = m_fCCEnable ? VARIANT_TRUE : VARIANT_FALSE;
  28. return NOERROR;
  29. } catch(...) {
  30. return E_POINTER;
  31. }
  32. }
  33. };
  34. }; /// namespace
  35. #endif
  36. // end of file - closedcaptioningimpl.h