' ########################################################################################
' Microsoft Windows
' File: PortableDeviceConnectApi.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_PortableDeviceConnectApi_PBI)
#DEFINE PBX_PortableDeviceConnectApi_PBI
%EQUATE `PORTABLEDEVICECONNECTAPI_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/System/WTypes.inc"
#INCLUDE ONCE "Legacy/System/propsys.inc"
#INCLUDE ONCE "Legacy/UI/PortableDeviceConnectImports.inc"
$LIBID_PortableDeviceConnectApiLib = GUID$("{8fe73967-aae2-4d77-9921-0c4962631056}")
$CLSID_EnumBthMtpConnectors = GUID$("{a1570149-e645-4f43-8b0d-409b061db2fc}")
'// Property set by the MTP Bluetooth Enumerator indicate whether the device is connected
'// DEVPKEY_MTPBTH_IsConnected, DEVPROP_TYPE_BOOLEAN
'//
'// {ea1237fa-589d-4472-84e4-0abe36fd62ef}.2
MACRO DEVPKEY_MTPBTH_IsConnected = GUID$("{ea1237fa-589d-4472-84e4-0abe36fd62ef}") & MKDWD$(2)
' ########################################################################################
' Interface name = IEnumPortableDeviceConnectors
' IID = bfdef549-9247-454f-bd82-06fe80853faa
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IEnumPortableDeviceConnectors_INTERFACE_DEFINED)
 %IEnumPortableDeviceConnectors_INTERFACE_DEFINED = 1
$IID_IEnumPortableDeviceConnectors = GUID$("{bfdef549-9247-454f-bd82-06fe80853faa}")
INTERFACE IEnumPortableDeviceConnectors $IID_IEnumPortableDeviceConnectors
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 12
 BYVAL cRequested AS DWORD
 , BYREF pConnectors AS IPortableDeviceConnector
 , BYREF pcFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 16
 BYVAL cConnectors AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 24
 BYREF ppEnum AS IEnumPortableDeviceConnectors
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IEnumPortableDeviceConnectors_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPortableDeviceConnector
' IID = 625e2df8-6392-4cf0-9ad1-3cfa5f17775c
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IPortableDeviceConnector_INTERFACE_DEFINED)
 %IPortableDeviceConnector_INTERFACE_DEFINED = 1
$IID_IPortableDeviceConnector = GUID$("{625e2df8-6392-4cf0-9ad1-3cfa5f17775c}")
INTERFACE IPortableDeviceConnector $IID_IPortableDeviceConnector
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Connect ( ' VTable offset = 12
 BYVAL pCallback AS IConnectionRequestCallback
 ) AS LONG
 ' =====================================================================================
 METHOD Disconnect ( ' VTable offset = 16
 BYVAL pCallback AS IConnectionRequestCallback
 ) AS LONG
 ' =====================================================================================
 METHOD Cancel ( ' VTable offset = 20
 BYVAL pCallback AS IConnectionRequestCallback
 ) AS LONG
 ' =====================================================================================
 METHOD GetProperty ( ' VTable offset = 24
 BYREF pPropertyKey AS DEVPROPKEY
 , BYREF pPropertyType AS DWORD
 , BYREF ppData AS DWORD
 , BYREF pcbData AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetProperty ( ' VTable offset = 28
 BYREF pPropertyKey AS DEVPROPKEY
 , BYREF PropertyType AS DWORD
 , BYVAL pData AS BYTE PTR
 , BYVAL cbData AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPnPID ( ' VTable offset = 32
 BYREF ppwszPnPID AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPortableDeviceConnector_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IConnectionRequestCallback
' IID = 272c9ae0-7161-4ae0-91bd-9f448ee9c427
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IConnectionRequestCallback_INTERFACE_DEFINED)
 %IConnectionRequestCallback_INTERFACE_DEFINED = 1
$IID_IConnectionRequestCallback = GUID$("{272c9ae0-7161-4ae0-91bd-9f448ee9c427}")
INTERFACE IConnectionRequestCallback $IID_IConnectionRequestCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnComplete ( ' VTable offset = 12
 BYVAL hrStatus AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IConnectionRequestCallback_INTERFACE_DEFINED__ */
#ENDIF
