' ########################################################################################
' Microsoft Windows
' File: wmsplaylistparser.inc
' Contents: Microsoft Windows Media Technologies
' 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_wmsplaylistparser_PBI)
#DEFINE PBX_wmsplaylistparser_PBI
%EQUATE `WMSPLAYLISTPARSER_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/System/MSXML.inc"
#INCLUDE ONCE "Legacy/System/nsscore.inc"
#INCLUDE ONCE "Legacy/Media/wmsbuffer.inc"
#INCLUDE ONCE "Legacy/System/datacontainer.inc"
$IID_IWMSPlaylistParser = GUID$("{0EE1F2EC-48EF-11d2-9EFF-006097D2D7CF}")
$IID_IWMSPlaylistParserCallback = GUID$("{0EE1F2ED-48EF-11D2-9EFF-006097D2D7CF}")
$IID_IWMSPlaylistParserPlugin = GUID$("{FA8764C1-90A2-11D2-9F22-006097D2D7CF}")
$IID_IWMSPlaylistParserPluginCallback = GUID$("{FA8764C2-90A2-11D2-9F22-006097D2D7CF}")
' ########################################################################################
' IWMSPlaylistParser interface
' IID = 0EE1F2EC-48EF-11d2-9EFF-006097D2D7CF
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWMSPlaylistParser_INTERFACE_DEFINED)
 %IWMSPlaylistParser_INTERFACE_DEFINED = 1
INTERFACE IWMSPlaylistParser $IID_IWMSPlaylistParser
 INHERIT IUnknown
 ' =====================================================================================
 METHOD ReadPlaylist ( ' VTable offset = 12
 BYVAL pBuffer AS INSSBuffer
 , BYVAL pPlaylist AS IXMLDOMDocument
 , BYVAL pCallback AS IWMSPlaylistParserCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD WritePlaylist ( ' VTable offset = 16
 BYVAL pPlaylist AS IXMLDOMDocument
 , BYVAL pCallback AS IWMSPlaylistParserCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD ReadPlaylistFromDirectory ( ' VTable offset = 20
 BYVAL pDirectory AS IWMSDirectory
 , BYREF pszwFilePattern AS WSTRINGZ
 , BYVAL pPlaylist AS IXMLDOMDocument
 , BYVAL pCallback AS IWMSPlaylistParserCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWMSPlaylistParser_INTERFACE_DEFINED__ */
' ########################################################################################
' IWMSPlaylistParserCallback interface
' IID = 0EE1F2ED-48EF-11D2-9EFF-006097D2D7CF
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWMSPlaylistParserCallback_INTERFACE_DEFINED)
 %IWMSPlaylistParserCallback_INTERFACE_DEFINED = 1
INTERFACE IWMSPlaylistParserCallback $IID_IWMSPlaylistParserCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnReadPlaylist ( ' VTable offset = 12
 BYVAL hr AS LONG
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnWritePlaylist ( ' VTable offset = 16
 BYVAL hr AS LONG
 , BYVAL pBuffer AS INSSBuffer
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWMSPlaylistParserCallback_INTERFACE_DEFINED__ */
' ########################################################################################
' IWMSPlaylistParserPlugin interface
' IID = FA8764C1-90A2-11D2-9F22-006097D2D7CF
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWMSPlaylistParserPlugin_INTERFACE_DEFINED)
 %IWMSPlaylistParserPlugin_INTERFACE_DEFINED = 1
INTERFACE IWMSPlaylistParserPlugin $IID_IWMSPlaylistParserPlugin
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreatePlaylistParser ( ' VTable offset = 12
 BYVAL pCommandContext AS IWMSCommandContext
 , BYVAL pUser AS IWMSContext
 , BYVAL pPresentation AS IWMSContext
 , BYVAL dwFlags AS DWORD
 , BYVAL pFactory AS IWMSClassObject
 , BYVAL pBufferAllocator AS IWMSBufferAllocator
 , BYVAL pCallback AS IWMSPlaylistParserPluginCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWMSPlaylistParserPlugin_INTERFACE_DEFINED__ */
' ########################################################################################
' IWMSPlaylistParserPluginCallback interface
' IID = FA8764C2-90A2-11D2-9F22-006097D2D7CF
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWMSPlaylistParserPluginCallback_INTERFACE_DEFINED)
 %IWMSPlaylistParserPluginCallback_INTERFACE_DEFINED = 1
INTERFACE IWMSPlaylistParserPluginCallback $IID_IWMSPlaylistParserPluginCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnCreatePlaylistParser ( ' VTable offset = 12
 BYVAL hr AS LONG
 , BYVAL pParser AS IWMSPlaylistParser
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWMSPlaylistParserPluginCallback_INTERFACE_DEFINED__ */
#ENDIF
