windows-nt/Source/XPSP1/NT/net/homenet/beacon/client/client.h

36 lines
1.1 KiB
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
#pragma once
#include "beacon.h"
#include <upnp.h>
class ATL_NO_VTABLE CBeaconFinder :
public CComObjectRootEx <CComSingleThreadModel>,
public IUPnPDeviceFinderCallback
{
public:
BEGIN_COM_MAP(CBeaconFinder)
COM_INTERFACE_ENTRY(IUPnPDeviceFinderCallback)
END_COM_MAP()
DECLARE_PROTECT_FINAL_CONSTRUCT();
CBeaconFinder();
STDMETHODIMP DeviceAdded(LONG lFindData, IUPnPDevice* pDevice);
STDMETHODIMP DeviceRemoved(LONG lFindData, BSTR bstrUDN);
STDMETHODIMP SearchComplete(LONG lFindData);
HRESULT Initialize(HWND hCallbackWindow);
private:
HRESULT FindService(IUPnPDevice* pDevice, LPWSTR pszServiceName, IUPnPService** ppICSService);
HRESULT FindDevice(IUPnPDevices* pDevices, LPWSTR pszDeviceType, IUPnPDevice** ppChildDevice);
HRESULT FindChildDevice(IUPnPDevice* pDevice, LPWSTR pszDeviceType, IUPnPDevice** ppChildDevice);
HRESULT GetServices(IUPnPDevice* pDevice, IInternetGateway** ppInternetGateway);
HRESULT IsServiceMatch(IUPnPService* pService, BSTR SearchCriteria, BOOL* pbMatch);
HWND m_hCallbackWindow;
};