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.

41 lines
1.0 KiB

  1. // RecoSleep.h : implement "Go to Sleep" and "Wakeup" commands.
  2. #ifndef RECO_SLEEP_H
  3. #define RECO_SLEEP_H
  4. #include "private.h"
  5. #include "sapilayr.h"
  6. #include "sapi.h"
  7. class CSpTask;
  8. class CRecoSleepClass
  9. {
  10. public:
  11. CRecoSleepClass(CSpTask *pSpTask );
  12. ~CRecoSleepClass( );
  13. HRESULT InitRecoSleepClass( );
  14. HRESULT ProcessSleepGrammar( SPPHRASE *pPhrase );
  15. static void NotifyCallback(WPARAM wParam, LPARAM lParam );
  16. BOOL IsInSleep( ) { return m_fSleeping; }
  17. private:
  18. CSpTask *m_pSpTask;
  19. CComPtr<ISpRecognizer> m_cpRecoEngine;
  20. CComPtr<ISpRecoContext> m_cpRecoContext;
  21. CComPtr<ISpRecoGrammar> m_cpSleepGrammar;
  22. WCHAR m_wszRule[MAX_PATH];
  23. WCHAR m_wszSleep[MAX_PATH];
  24. WCHAR m_wszWakeup[MAX_PATH];
  25. BOOL m_fSleeping;
  26. SPSTATEHANDLE m_hSleepRule;
  27. BOOL m_Initialized;
  28. };
  29. #endif // RECO_SLEEP_H