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.

61 lines
1.8 KiB

  1. // --------------------------------------------------
  2. // PackTvRat.h
  3. //
  4. // TvRating is a private but well defined 'wire' format
  5. // for XDS ratings infomation. It is persisted in the PVR
  6. // buffer.
  7. //
  8. // This file contains methods for convering between the
  9. // 3-part (system, rating, attribute) format and the packed format.
  10. //
  11. // Copyright (c) 2002, Microsoft
  12. // ----------------------------------------------------
  13. #ifndef __PACKTvRat_H__
  14. #define __PACKTvRat_H__
  15. // totally private rating system that's persisted as a 'PackedTvRating' in the
  16. // pvr file. Can't change once the first file gets saved.
  17. typedef struct
  18. {
  19. byte s_System;
  20. byte s_Level;
  21. byte s_Attributes;
  22. byte s_Reserved;
  23. } struct_PackedTvRating;
  24. // union to help convering
  25. typedef union
  26. {
  27. PackedTvRating pr;
  28. struct_PackedTvRating sr;
  29. } UTvRating;
  30. HRESULT
  31. UnpackTvRating(
  32. IN PackedTvRating TvRating,
  33. OUT EnTvRat_System *pEnSystem,
  34. OUT EnTvRat_GenericLevel *pEnLevel,
  35. OUT LONG *plbffEnAttributes // BfEnTvRat_GenericAttributes
  36. );
  37. HRESULT
  38. PackTvRating(
  39. IN EnTvRat_System enSystem,
  40. IN EnTvRat_GenericLevel enLevel,
  41. IN LONG lbfEnAttributes, // BfEnTvRat_GenericAttributes
  42. OUT PackedTvRating *pTvRating
  43. );
  44. // development only code, remove eventually
  45. HRESULT
  46. RatingToString( IN EnTvRat_System enSystem,
  47. IN EnTvRat_GenericLevel enLevel,
  48. IN LONG lbfEnAttributes, // BfEnTvRat_GenericAttributes
  49. IN TCHAR *pszBuff, // allocated by caller
  50. IN int cBuff); // size of above buffer must be >= 64 //
  51. #endif