37 lines
876 B
C++
37 lines
876 B
C++
#pragma once
|
|
|
|
#include "dtcore/inc/dtdefinitions.h"
|
|
#include "dtcore/inc/dtaddress.h"
|
|
#include "dtcore/inc/dtservice.h"
|
|
|
|
namespace dt
|
|
{
|
|
class Console;
|
|
class ClientService;
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
class ClientImpl;
|
|
|
|
class Client
|
|
{
|
|
public:
|
|
DT_CORE_DLL_ENTRY Client();
|
|
DT_CORE_DLL_ENTRY ~Client();
|
|
|
|
DT_CORE_DLL_ENTRY bool Connect(const Address& addr);
|
|
DT_CORE_DLL_ENTRY bool Connect(const String& url, Console* console, int timeoutMs = 120000);
|
|
|
|
DT_CORE_DLL_ENTRY void Disconnect();
|
|
|
|
DT_CORE_DLL_ENTRY bool IsConnected() const;
|
|
|
|
DT_CORE_DLL_ENTRY void RegisterConnectedService(ClientService& service);
|
|
DT_CORE_DLL_ENTRY void UnregisterConnectedService(ClientService& service);
|
|
|
|
private:
|
|
ClientImpl* m_Impl;
|
|
};
|
|
|
|
}
|
|
|