wmsdkvalidate.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //*@@@+++@@@@******************************************************************
  2. //
  3. // Microsoft Windows Media
  4. // Copyright (C) Microsoft Corporation. All rights reserved.
  5. //
  6. //*@@@---@@@@******************************************************************
  7. //
  8. #pragma once
  9. #ifndef _WMSDK_VALIDATE_H
  10. #define _WMSDK_VALIDATE_H
  11. //
  12. // This routine examines the file extension in the URL or file name that is passed
  13. // in as an argument. The routine returns S_OK if the file extension is included in a
  14. // set of file extensions that the SDK is typically able to handle. or NS_E_INVALID_NAME
  15. // if the file extension is not included in that set.
  16. //
  17. // This routine cannot be used to determine with absolute certainty if the SDK can
  18. // handle a particular URL, as this cannot be known until the URL is opened.
  19. //
  20. HRESULT STDMETHODCALLTYPE WMCheckURLExtension( /* [in] */ LPCWSTR pwszURL );
  21. //
  22. // This routine examines the URL scheme that is passed in as an argument. The routine
  23. // returns S_OK if the URL scheme is included in a set of URL schemes that the SDK is
  24. // typically able to handle. or NS_E_INVALID_NAME if the URL scheme is not included in
  25. // that set.
  26. //
  27. // This routine cannot be used to determine with absolute certainty if the SDK can
  28. // handle a particular URL, as this cannot be known until the URL is opened.
  29. //
  30. HRESULT STDMETHODCALLTYPE WMCheckURLScheme( /* [in] */ LPCWSTR pwszURLScheme );
  31. //
  32. // This routine returns S_OK if the data buffer looks like a file type that is supported
  33. // by the SDK. It returns NS_E_INVALID_DATA if the data buffer cannot be handled by the SDK.
  34. // This routine may return a false positive, but will not return a false negative.
  35. //
  36. HRESULT STDMETHODCALLTYPE WMValidateData(
  37. /* [in] */ BYTE *pbData,
  38. /* [in, out] */ DWORD *pdwDataSize
  39. );
  40. //
  41. // This routine validates that a URL can be played in Offline mode.
  42. // The parameter pwszLanguage can be set to a RFC-1766 language ID, or to NULL if
  43. // any language is acceptable.
  44. // The output parameter pfIsAvailableOffline is set to TRUE if the URL can be
  45. // played in Offline mode.
  46. //
  47. HRESULT STDMETHODCALLTYPE WMIsAvailableOffline(
  48. /* [in] */ LPCWSTR pwszURL,
  49. /* [in] */ LPCWSTR pwszLanguage,
  50. /* [out] */ BOOL *pfIsAvailableOffline
  51. );
  52. #endif /* _WMSDK_VALIDATE_H */