' ########################################################################################
' Microsoft Windows
' File: tvratings.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_tvratings_PBI)
#DEFINE PBX_tvratings_PBI
%EQUATE `TVRATINGS_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/COM/OCIdl.inc"
'EXTERN_C const IID LIBID_TVRATINGSLib;
$CLSID_XDSToRat = GUID$("{C5C5C5B0-3ABC-11D6-B25B-00C04FA0C026}")
$CLSID_EvalRat = GUID$("{C5C5C5F1-3ABC-11D6-B25B-00C04FA0C026}")
' ========================================================================================
' EnTvRat_System enum
' ========================================================================================
%EQUATE `EnTvRat_System_MPAA = 0
%EQUATE `EnTvRat_System_US_TV = 1
%EQUATE `EnTvRat_System_Canadian_English = 2
%EQUATE `EnTvRat_System_Canadian_French = 3
%EQUATE `EnTvRat_System_Reserved4 = 4
%EQUATE `EnTvRat_System_System5 = 5
%EQUATE `EnTvRat_System_System6 = 6
%EQUATE `EnTvRat_System_Reserved7 = 7
%EQUATE `EnTvRat_System_PBDA = 8
%EQUATE `EnTvRat_System_AgeBased = 9
%EQUATE `EnTvRat_System_TvRat_kSystems = 10
%EQUATE `EnTvRat_System_TvRat_SystemDontKnow = 255
' ========================================================================================
' EnTvRat_GenericLevel enum
' ========================================================================================
%EQUATE `EnTvRat_GenericLevel_TvRat_0 = 0
%EQUATE `EnTvRat_GenericLevel_TvRat_1 = 1
%EQUATE `EnTvRat_GenericLevel_TvRat_2 = 2
%EQUATE `EnTvRat_GenericLevel_TvRat_3 = 3
%EQUATE `EnTvRat_GenericLevel_TvRat_4 = 4
%EQUATE `EnTvRat_GenericLevel_TvRat_5 = 5
%EQUATE `EnTvRat_GenericLevel_TvRat_6 = 6
%EQUATE `EnTvRat_GenericLevel_TvRat_7 = 7
%EQUATE `EnTvRat_GenericLevel_TvRat_8 = 8
%EQUATE `EnTvRat_GenericLevel_TvRat_9 = 9
%EQUATE `EnTvRat_GenericLevel_TvRat_10 = 10
%EQUATE `EnTvRat_GenericLevel_TvRat_11 = 11
%EQUATE `EnTvRat_GenericLevel_TvRat_12 = 12
%EQUATE `EnTvRat_GenericLevel_TvRat_13 = 13
%EQUATE `EnTvRat_GenericLevel_TvRat_14 = 14
%EQUATE `EnTvRat_GenericLevel_TvRat_15 = 15
%EQUATE `EnTvRat_GenericLevel_TvRat_16 = 16
%EQUATE `EnTvRat_GenericLevel_TvRat_17 = 17
%EQUATE `EnTvRat_GenericLevel_TvRat_18 = 18
%EQUATE `EnTvRat_GenericLevel_TvRat_19 = 19
%EQUATE `EnTvRat_GenericLevel_TvRat_20 = 20
%EQUATE `EnTvRat_GenericLevel_TvRat_21 = 21
%EQUATE `EnTvRat_GenericLevel_kLevels = 22
%EQUATE `EnTvRat_GenericLevel_Unblock = -1
%EQUATE `EnTvRat_GenericLevel_TvRat_LevelDontKnow = 255
' ========================================================================================
' EnTvRat_MPAA enum
' ========================================================================================
%EQUATE `EnTvRat_MPAA_NotApplicable = %EnTvRat_GenericLevel_TvRat_0
%EQUATE `EnTvRat_MPAA_G = %EnTvRat_GenericLevel_TvRat_1
%EQUATE `EnTvRat_MPAA_PG = %EnTvRat_GenericLevel_TvRat_2
%EQUATE `EnTvRat_MPAA_PG13 = %EnTvRat_GenericLevel_TvRat_3
%EQUATE `EnTvRat_MPAA_R = %EnTvRat_GenericLevel_TvRat_4
%EQUATE `EnTvRat_MPAA_NC17 = %EnTvRat_GenericLevel_TvRat_5
%EQUATE `EnTvRat_MPAA_X = %EnTvRat_GenericLevel_TvRat_6
%EQUATE `EnTvRat_MPAA_NotRated = %EnTvRat_GenericLevel_TvRat_7
' ========================================================================================
' EnTvRat_US_TV enum
' ========================================================================================
%EQUATE `EnTvRat_US_TV_None = %EnTvRat_GenericLevel_TvRat_0
%EQUATE `EnTvRat_US_TV_Y = %EnTvRat_GenericLevel_TvRat_1
%EQUATE `EnTvRat_US_TV_Y7 = %EnTvRat_GenericLevel_TvRat_2
%EQUATE `EnTvRat_US_TV_G = %EnTvRat_GenericLevel_TvRat_3
%EQUATE `EnTvRat_US_TV_PG = %EnTvRat_GenericLevel_TvRat_4
%EQUATE `EnTvRat_US_TV_14 = %EnTvRat_GenericLevel_TvRat_5
%EQUATE `EnTvRat_US_TV_MA = %EnTvRat_GenericLevel_TvRat_6
%EQUATE `EnTvRat_US_TV_None7 = %EnTvRat_GenericLevel_TvRat_7
' ========================================================================================
' EnTvRat_CAE_TV enum
' ========================================================================================
%EQUATE `EnTvRat_CAE_TV_Exempt = %EnTvRat_GenericLevel_TvRat_0
%EQUATE `EnTvRat_CAE_TV_C = %EnTvRat_GenericLevel_TvRat_1
%EQUATE `EnTvRat_CAE_TV_C8 = %EnTvRat_GenericLevel_TvRat_2
%EQUATE `EnTvRat_CAE_TV_G = %EnTvRat_GenericLevel_TvRat_3
%EQUATE `EnTvRat_CAE_TV_PG = %EnTvRat_GenericLevel_TvRat_4
%EQUATE `EnTvRat_CAE_TV_14 = %EnTvRat_GenericLevel_TvRat_5
%EQUATE `EnTvRat_CAE_TV_18 = %EnTvRat_GenericLevel_TvRat_6
%EQUATE `EnTvRat_CAE_TV_Reserved = %EnTvRat_GenericLevel_TvRat_7
' ========================================================================================
' EnTvRat_CAF_TV enum
' ========================================================================================
%EQUATE `EnTvRat_CAF_TV_Exempt = %EnTvRat_GenericLevel_TvRat_0
%EQUATE `EnTvRat_CAF_TV_G = %EnTvRat_GenericLevel_TvRat_1
%EQUATE `EnTvRat_CAF_TV_8 = %EnTvRat_GenericLevel_TvRat_2
%EQUATE `EnTvRat_CAF_TV_13 = %EnTvRat_GenericLevel_TvRat_3
%EQUATE `EnTvRat_CAF_TV_16 = %EnTvRat_GenericLevel_TvRat_4
%EQUATE `EnTvRat_CAF_TV_18 = %EnTvRat_GenericLevel_TvRat_5
%EQUATE `EnTvRat_CAF_TV_Reserved6 = %EnTvRat_GenericLevel_TvRat_6
%EQUATE `EnTvRat_CAF_TV_Reserved = %EnTvRat_GenericLevel_TvRat_7
' ========================================================================================
' BfEnTvRat_GenericAttributes enum
' ========================================================================================
%EQUATE `BfEnTvRat_GenericAttributes_BfAttrNone = 0
%EQUATE `BfEnTvRat_GenericAttributes_BfIsBlocked = 1
%EQUATE `BfEnTvRat_GenericAttributes_BfIsAttr_1 = 2
%EQUATE `BfEnTvRat_GenericAttributes_BfIsAttr_2 = 4
%EQUATE `BfEnTvRat_GenericAttributes_BfIsAttr_3 = 8
%EQUATE `BfEnTvRat_GenericAttributes_BfIsAttr_4 = 16
%EQUATE `BfEnTvRat_GenericAttributes_BfIsAttr_5 = 32
%EQUATE `BfEnTvRat_GenericAttributes_BfIsAttr_6 = 64
%EQUATE `BfEnTvRat_GenericAttributes_BfIsAttr_7 = 128
%EQUATE `BfEnTvRat_GenericAttributes_BfValidAttrSubmask = 255
' BfEnTvRat_Attributes_US_TV
%EQUATE `BfEnTvRat_Attributes_US_TV_IsBlocked = %BfEnTvRat_GenericAttributes_BfIsBlocked
%EQUATE `BfEnTvRat_Attributes_US_TV_IsViolent = %BfEnTvRat_GenericAttributes_BfIsAttr_1
%EQUATE `BfEnTvRat_Attributes_US_TV_IsSexualSituation = %BfEnTvRat_GenericAttributes_BfIsAttr_2
%EQUATE `BfEnTvRat_Attributes_US_TV_IsAdultLanguage = %BfEnTvRat_GenericAttributes_BfIsAttr_3
%EQUATE `BfEnTvRat_Attributes_US_TV_IsSexuallySuggestiveDialog = %BfEnTvRat_GenericAttributes_BfIsAttr_4
%EQUATE `BfEnTvRat_Attributes_US_TV_ValidAttrSubmask = 31
' BfEnTvRat_Attributes_MPAA enum
%EQUATE `BfEnTvRat_Attributes_MPAA_IsBlocked = %BfEnTvRat_GenericAttributes_BfIsBlocked
%EQUATE `BfEnTvRat_Attributes_MPAA_ValidAttrSubmask = 1
' BfEnTvRat_Attributes_CAE_TV
%EQUATE `BfEnTvRat_Attributes_CAE_IsBlocked = %BfEnTvRat_GenericAttributes_BfIsBlocked
%EQUATE `BfEnTvRat_Attributes_CAE_ValidAttrSubmask = 1
' BfEnTvRat_Attributes_CAF_TV enum
%EQUATE `BfEnTvRat_Attributes_CAF_IsBlocked = %BfEnTvRat_GenericAttributes_BfIsBlocked
%EQUATE `BfEnTvRat_Attributes_CAF_ValidAttrSubmask = 1
' ########################################################################################
' Interface name = IXDSToRat
' IID = C5C5C5B0-3ABC-11D6-B25B-00C04FA0C026
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%IXDSToRat_INTERFACE_DEFINED)
 %IXDSToRat_INTERFACE_DEFINED = 1
$IID_IXDSToRat = GUID$("{C5C5C5B0-3ABC-11D6-B25B-00C04FA0C026}")
INTERFACE IXDSToRat $IID_IXDSToRat
 INHERIT IDispatch
 ' =====================================================================================
 METHOD Init ( ' VTable offset = 28
 ) ' void
 ' =====================================================================================
 METHOD ParseXDSBytePair ( ' VTable offset = 32
 BYVAL byte1 AS BYTE
 , BYVAL byte2 AS BYTE
 , BYREF pEnSystem AS LONG
 , BYREF pEnLevel AS LONG
 , BYREF plBfEnAttributes AS LONG
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IXDSToRat_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IEvalRat
' IID = C5C5C5B1-3ABC-11D6-B25B-00C04FA0C026
' Inherited interface = IDispatch
' ########################################################################################
#IF NOT %DEF(%IEvalRat_INTERFACE_DEFINED)
 %IEvalRat_INTERFACE_DEFINED = 1
$IID_IEvalRat = GUID$("{C5C5C5B1-3ABC-11D6-B25B-00C04FA0C026}")
INTERFACE IEvalRat $IID_IEvalRat
 INHERIT IDispatch
 ' =====================================================================================
 PROPERTY GET BlockedRatingAttributes ( ' VTable offset = 28
 BYVAL enSystem AS LONG
 , BYVAL enLevel AS LONG
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET BlockedRatingAttributes ( ' VTable offset = 32
 BYVAL enSystem AS LONG
 , BYVAL enLevel AS LONG
 , BYVAL lbfAttrs AS LONG
 ) ' void
 ' =====================================================================================
 PROPERTY GET BlockUnRated ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 PROPERTY SET BlockUnRated ( ' VTable offset = 40
 BYVAL fBlockUnRatedShows AS LONG
 ) ' void
 ' =====================================================================================
 METHOD MostRestrictiveRating ( ' VTable offset = 44
 BYVAL enSystem1 AS LONG
 , BYVAL enEnLevel1 AS LONG
 , BYVAL lbfEnAttr1 AS LONG
 , BYVAL enSystem2 AS LONG
 , BYVAL enEnLevel2 AS LONG
 , BYVAL lbfEnAttr2 AS LONG
 , BYREF penSystem AS LONG
 , BYREF penEnLevel AS LONG
 , BYREF plbfEnAttr AS LONG
 ) ' void
 ' =====================================================================================
 METHOD TestRating ( ' VTable offset = 48
 BYVAL enShowSystem AS LONG
 , BYVAL enShowLevel AS LONG
 , BYVAL lbfEnShowAttributes AS LONG
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IEvalRat_INTERFACE_DEFINED__ */
#ENDIF
