11 #include "network/IWSDiscovery.h" 12 #include "threads/CriticalSection.h" 15 #pragma comment(lib, "wsdapi.lib") 29 HRESULT STDMETHODCALLTYPE Add(IWSDiscoveredService* service);
30 HRESULT STDMETHODCALLTYPE Remove(IWSDiscoveredService* service);
31 HRESULT STDMETHODCALLTYPE SearchFailed(HRESULT hr, LPCWSTR tag);
32 HRESULT STDMETHODCALLTYPE SearchComplete(LPCWSTR tag);
33 HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid,
void**
object);
34 ULONG STDMETHODCALLTYPE AddRef();
35 ULONG STDMETHODCALLTYPE Release();
37 bool ThereAreServers() {
return m_serversIPs.size() > 0; }
38 std::vector<std::wstring> GetServersIPs() {
return m_serversIPs; }
41 std::vector<std::wstring> m_serversIPs;
43 CCriticalSection m_criticalSection;
52 bool StartServices()
override;
53 bool StopServices()
override;
54 bool IsRunning()
override;
56 bool ThereAreServers();
57 std::vector<std::wstring> GetServersIPs();
59 static std::wstring ResolveHostName(
const std::wstring& serverIP);
62 bool m_initialized =
false;
63 IWSDiscoveryProvider* m_provider =
nullptr;
Definition: IWSDiscovery.h:13
Definition: WSDiscoveryWin32.h:46
Definition: IWSDiscovery.h:15
Definition: WSDiscoveryWin32.h:21