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.

58 lines
1.5 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Autoplay Handler
  3. ///////////////////////////////////////////////////////////////////////////////
  4. #ifndef _SETTINGS_H
  5. #define _SETTINGS_H
  6. #include "unk.h"
  7. #include "misc.h"
  8. #include <shpriv.h>
  9. class CAutoplayHandlerImpl : public CCOMBase, public IAutoplayHandler
  10. {
  11. public:
  12. // Interface IAutoplayHandler
  13. STDMETHODIMP Init(LPCWSTR pszDeviceID, LPCWSTR pszEventType);
  14. STDMETHODIMP InitWithContent(LPCWSTR pszDeviceID, LPCWSTR pszEventType,
  15. LPCWSTR pszContentTypeHandler);
  16. STDMETHODIMP EnumHandlers(IEnumAutoplayHandler** ppenum);
  17. STDMETHODIMP GetDefaultHandler(LPWSTR* ppszHandler);
  18. STDMETHODIMP SetDefaultHandler(LPCWSTR pszHandler);
  19. public:
  20. CAutoplayHandlerImpl();
  21. private:
  22. HRESULT _Init(LPCWSTR pszDeviceID, LPCWSTR pszEventType);
  23. private:
  24. WCHAR _szEventHandler[MAX_EVENTHANDLER];
  25. WCHAR _szDeviceIDReal[MAX_DEVICEID];
  26. BOOL _fInited;
  27. };
  28. typedef CUnkTmpl<CAutoplayHandlerImpl> CAutoplayHandler;
  29. class CAutoplayHandlerPropertiesImpl : public CCOMBase,
  30. public IAutoplayHandlerProperties
  31. {
  32. public:
  33. // Interface IAutoplayHandlerProperties
  34. STDMETHODIMP Init(LPCWSTR pszHandler);
  35. STDMETHODIMP GetInvokeProgIDAndVerb(LPWSTR* ppszInvokeProgID,
  36. LPWSTR* ppszInvokeVerb);
  37. public:
  38. CAutoplayHandlerPropertiesImpl();
  39. private:
  40. WCHAR _szHandler[MAX_HANDLER];
  41. BOOL _fInited;
  42. };
  43. typedef CUnkTmpl<CAutoplayHandlerPropertiesImpl> CAutoplayHandlerProperties;
  44. #endif // _SETTINGS_H