' ########################################################################################
' Microsoft Windows
' File: upnphost.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.
' ########################################################################################
' ########################################################################################
' Library name: UPnPHostLib
' Version: 1.0, Locale ID = 0
' Description: UPnP 1.0 Type Library
' Path: C:\WINDOWS\system32\upnpcont.exe
' Library GUID: {204810B3-73B2-11D4-BF42-00B0D0118B56}
' ########################################################################################
#IF NOT %DEF(PBX_upnphost_PBI)
#DEFINE PBX_upnphost_PBI
%EQUATE `UPNPHOST_INC = 1
' /* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OCIdl.inc"
$LIBID_UPnPHostLib = GUID$("{204810B3-73B2-11D4-BF42-00B0D0118B56}")
' ========================================================================================
' ClsIDs (Class identifiers)
' ========================================================================================
$CLSID_UPnPRegistrar = GUID$("{204810B9-73B2-11D4-BF42-00B0D0118B56}")
$CLSID_UPnPRemoteEndpointInfo = GUID$("{2E5E84E9-4049-4244-B728-2D24227157C7}")
' ========================================================================================
' IIDs (Interface identifiers)
' ========================================================================================
$IID_IUPnPDeviceControl = GUID$("{204810BA-73B2-11D4-BF42-00B0D0118B56}")
$IID_IUPnPDeviceProvider = GUID$("{204810B8-73B2-11D4-BF42-00B0D0118B56}")
$IID_IUPnPEventSink = GUID$("{204810B4-73B2-11D4-BF42-00B0D0118B56}")
$IID_IUPnPEventSource = GUID$("{204810B5-73B2-11D4-BF42-00B0D0118B56}")
$IID_IUPnPRegistrar = GUID$("{204810B6-73B2-11D4-BF42-00B0D0118B56}")
$IID_IUPnPRemoteEndpointInfo = GUID$("{C92EB863-0269-4AFF-9C72-75321BBA2952}")
$IID_IUPnPReregistrar = GUID$("{204810B7-73B2-11D4-BF42-00B0D0118B56}")
%EQUATE `UPNP_E_REQUIRED_ELEMENT_ERROR = &HFFFFA020& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA020)
%EQUATE `UPNP_E_DUPLICATE_NOT_ALLOWED = &HFFFFA021& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA021)
%EQUATE `UPNP_E_DUPLICATE_SERVICE_ID = &HFFFFA022& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA022)
%EQUATE `UPNP_E_INVALID_DESCRIPTION = &HFFFFA023& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA023)
%EQUATE `UPNP_E_INVALID_SERVICE = &HFFFFA024& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA024)
%EQUATE `UPNP_E_INVALID_ICON = &HFFFFA025& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA025)
%EQUATE `UPNP_E_INVALID_XML = &HFFFFA026& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA026)
%EQUATE `UPNP_E_INVALID_ROOT_NAMESPACE = &HFFFFA027& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA027)
%EQUATE `UPNP_E_SUFFIX_TOO_LONG = &HFFFFA028& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA028)
%EQUATE `UPNP_E_URLBASE_PRESENT = &HFFFFA029& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA029)
%EQUATE `UPNP_E_VALUE_TOO_LONG = &HFFFFA030& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA030)
%EQUATE `UPNP_E_DEVICE_RUNNING = &HFFFFA031& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA031)
%EQUATE `UPNP_E_DEVICE_NOTREGISTERED = &HFFFFA032& ' MAKE_HRESULT(SEVERITY_ERROR FACILITY_ITF 0xA032)
' // Remote address value is a string
' #define REMOTE_ADDRESS_VALUE_NAME L"RemoteAddress"
$REMOTE_ADDRESS_VALUE_NAME = "RemoteAddress"
' // Address family value is a DWORD
' #define ADDRESS_FAMILY_VALUE_NAME L"AddressFamily"
$ADDRESS_FAMILY_VALUE_NAME = "AddressFamily"
' ########################################################################################
' Interface name = IUPnPEventSink
' IID = {204810B4-73B2-11D4-BF42-00B0D0118B56}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUPnPEventSink_INTERFACE_DEFINED)
 %IUPnPEventSink_INTERFACE_DEFINED = 1
INTERFACE IUPnPEventSink $IID_IUPnPEventSink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnStateChanged ( ' VTable offset = 12
 BYVAL cChanges AS DWORD
 , BYREF rgdispidChanges AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD OnStateChangedSafe ( ' VTable offset = 16
 BYVAL varsadispidChanges AS VARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUPnPEventSink_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUPnPEventSource
' IID = {204810B5-73B2-11D4-BF42-00B0D0118B56}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUPnPEventSource_INTERFACE_DEFINED)
 %IUPnPEventSource_INTERFACE_DEFINED = 1
INTERFACE IUPnPEventSource $IID_IUPnPEventSource
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Advise ( ' VTable offset = 12
 BYVAL pesSubscriber AS IUPnPEventSink
 ) AS LONG
 ' =====================================================================================
 METHOD Unadvise ( ' VTable offset = 16
 BYVAL pesSubscriber AS IUPnPEventSink
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUPnPEventSource_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUPnPRegistrar
' IID = {204810B6-73B2-11D4-BF42-00B0D0118B56}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUPnPRegistrar_INTERFACE_DEFINED)
 %IUPnPRegistrar_INTERFACE_DEFINED = 1
INTERFACE IUPnPRegistrar $IID_IUPnPRegistrar
 INHERIT IUnknown
 ' =====================================================================================
 METHOD RegisterDevice ( ' VTable offset = 12
 BYVAL bstrXMLDesc AS WSTRING
 , BYVAL bstrProgIDDeviceControlClass AS WSTRING
 , BYVAL bstrInitString AS WSTRING
 , BYVAL bstrContainerId AS WSTRING
 , BYVAL bstrResourcePath AS WSTRING
 , BYVAL nLifeTime AS LONG
 , BYREF pbstrDeviceIdentifier AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD RegisterRunningDevice ( ' VTable offset = 16
 BYVAL bstrXMLDesc AS WSTRING
 , BYVAL punkDeviceControl AS IUnknown
 , BYVAL bstrInitString AS WSTRING
 , BYVAL bstrResourcePath AS WSTRING
 , BYVAL nLifeTime AS LONG
 , BYREF pbstrDeviceIdentifier AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD RegisterDeviceProvider ( ' VTable offset = 20
 BYVAL bstrProviderName AS WSTRING
 , BYVAL bstrProgIDProviderClass AS WSTRING
 , BYVAL bstrInitString AS WSTRING
 , BYVAL bstrContainerId AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetUniqueDeviceName ( ' VTable offset = 24
 BYVAL bstrDeviceIdentifier AS WSTRING
 , BYVAL bstrTemplateUDN AS WSTRING
 , BYREF pbstrUDN AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD UnregisterDevice ( ' VTable offset = 28
 BYVAL bstrDeviceIdentifier AS WSTRING
 , BYVAL fPermanent AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD UnregisterDeviceProvider ( ' VTable offset = 32
 BYVAL bstrProviderName AS WSTRING
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUPnPRegistrar_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUPnPReregistrar
' IID = {204810B7-73B2-11D4-BF42-00B0D0118B56}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUPnPReregistrar_INTERFACE_DEFINED)
 %IUPnPReregistrar_INTERFACE_DEFINED = 1
INTERFACE IUPnPReregistrar $IID_IUPnPReregistrar
 INHERIT IUnknown
 ' =====================================================================================
 METHOD ReregisterDevice ( ' VTable offset = 12
 BYVAL bstrDeviceIdentifier AS WSTRING
 , BYVAL bstrXMLDesc AS WSTRING
 , BYVAL bstrProgIDDeviceControlClass AS WSTRING
 , BYVAL bstrInitString AS WSTRING
 , BYVAL bstrContainerId AS WSTRING
 , BYVAL bstrResourcePath AS WSTRING
 , BYVAL nLifeTime AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD ReregisterRunningDevice ( ' VTable offset = 16
 BYVAL bstrDeviceIdentifier AS WSTRING
 , BYVAL bstrXMLDesc AS WSTRING
 , BYVAL punkDeviceControl AS IUnknown
 , BYVAL bstrInitString AS WSTRING
 , BYVAL bstrResourcePath AS WSTRING
 , BYVAL nLifeTime AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUPnPReregistrar_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUPnPDeviceControl
' IID = {204810BA-73B2-11D4-BF42-00B0D0118B56}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUPnPDeviceControl_INTERFACE_DEFINED)
 %IUPnPDeviceControl_INTERFACE_DEFINED = 1
INTERFACE IUPnPDeviceControl $IID_IUPnPDeviceControl
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Initialize ( ' VTable offset = 12
 BYVAL bstrXMLDesc AS WSTRING
 , BYVAL bstrDeviceIdentifier AS WSTRING
 , BYVAL bstrInitString AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetServiceObject ( ' VTable offset = 16
 BYVAL bstrUDN AS WSTRING
 , BYVAL bstrServiceId AS WSTRING
 , BYREF ppdispService AS IDispatch
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUPnPDeviceControl_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUPnPDeviceProvider
' IID = {204810B8-73B2-11D4-BF42-00B0D0118B56}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUPnPDeviceProvider_INTERFACE_DEFINED)
 %IUPnPDeviceProvider_INTERFACE_DEFINED = 1
INTERFACE IUPnPDeviceProvider $IID_IUPnPDeviceProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Start ( ' VTable offset = 12
 BYVAL bstrInitString AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD Stop ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUPnPDeviceProvider_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUPnPRemoteEndpointInfo
' IID = {C92EB863-0269-4AFF-9C72-75321BBA2952}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUPnPRemoteEndpointInfo_INTERFACE_DEFINED)
 %IUPnPRemoteEndpointInfo_INTERFACE_DEFINED = 1
INTERFACE IUPnPRemoteEndpointInfo $IID_IUPnPRemoteEndpointInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetDwordValue ( ' VTable offset = 12
 BYVAL bstrValueName AS WSTRING
 , BYREF pdwValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStringValue ( ' VTable offset = 16
 BYVAL bstrValueName AS WSTRING
 , BYREF pbstrValue AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetGuidValue ( ' VTable offset = 20
 BYVAL bstrValueName AS WSTRING
 , BYREF pguidValue AS GUID
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUPnPRemoteEndpointInfo_INTERFACE_DEFINED__ */
#ENDIF
