aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/Service/Service_NetClient.h
diff options
context:
space:
mode:
Diffstat (limited to 'LibOVR/Src/Service/Service_NetClient.h')
-rw-r--r--LibOVR/Src/Service/Service_NetClient.h34
1 files changed, 22 insertions, 12 deletions
diff --git a/LibOVR/Src/Service/Service_NetClient.h b/LibOVR/Src/Service/Service_NetClient.h
index 6be6de8..96a8ad9 100644
--- a/LibOVR/Src/Service/Service_NetClient.h
+++ b/LibOVR/Src/Service/Service_NetClient.h
@@ -50,35 +50,42 @@ class NetClient : public NetSessionCommon,
// Status
bool LatencyTesterAvailable;
+ int HMDCount;
+ bool EdgeTriggeredHMDCount;
virtual void OnReceive(Net::ReceivePayload* pPayload, Net::ListenerReceiveResult* lrrOut);
virtual void OnDisconnected(Net::Connection* conn);
virtual void OnConnected(Net::Connection* conn);
- virtual void OnConnectionAttemptFailed(Net::Connection* conn);
virtual int Run();
public:
- bool Connect();
- bool IsConnected(bool attemptReconnect = false);
+ bool Connect(bool blocking);
+ bool IsConnected(bool attemptReconnect, bool blockOnReconnect);
void Disconnect();
void GetLocalProtocolVersion(int& major, int& minor, int& patch);
// This function may fail if it is not connected
bool GetRemoteProtocolVersion(int& major, int& minor, int& patch);
+ void SetLastError(String str);
+
public:
- // Key-value storage
+ // Persistent key-value storage
const char* GetStringValue(VirtualHmdId hmd, const char* key, const char* default_val);
bool GetBoolValue(VirtualHmdId hmd, const char* key, bool default_val);
int GetIntValue(VirtualHmdId hmd, const char* key, int default_val);
double GetNumberValue(VirtualHmdId hmd, const char* key, double default_val);
int GetNumberValues(VirtualHmdId hmd, const char* key, double* values, int num_vals);
- void SetStringValue(VirtualHmdId hmd, const char* key, const char* val);
- void SetBoolValue(VirtualHmdId hmd, const char* key, bool val);
- void SetIntValue(VirtualHmdId hmd, const char* key, int val);
- void SetNumberValue(VirtualHmdId hmd, const char* key, double val);
- void SetNumberValues(VirtualHmdId hmd, const char* key, const double* vals, int num_vals);
+
+ bool SetStringValue(VirtualHmdId hmd, const char* key, const char* val);
+ bool SetBoolValue(VirtualHmdId hmd, const char* key, bool val);
+ bool SetIntValue(VirtualHmdId hmd, const char* key, int val);
+ bool SetNumberValue(VirtualHmdId hmd, const char* key, double val);
+ bool SetNumberValues(VirtualHmdId hmd, const char* key, const double* vals, int num_vals);
+
+ bool GetDriverMode(bool& driverInstalled, bool& compatMode, bool& hideDK1Mode);
+ bool SetDriverMode(bool compatMode, bool hideDK1Mode);
int Hmd_Detect();
bool Hmd_Create(int index, HMDNetworkInfo* netInfo);
@@ -99,7 +106,7 @@ public:
unsigned int Hmd_SetEnabledCaps(VirtualHmdId hmd, unsigned int hmdCaps);
// Updates driver render target
- void Hmd_AttachToWindow(VirtualHmdId hmd, void* hWindow);
+ bool Hmd_AttachToWindow(VirtualHmdId hmd, void* hWindow);
//-------------------------------------------------------------------------------------
// *** Tracking Setup
@@ -123,11 +130,14 @@ protected:
void registerRPC();
- ObserverScope<OVR::Net::Plugins::RPCSlot> InitialServerStateScope;
+ ObserverScope<Net::Plugins::RPCSlot> InitialServerStateScope;
void InitialServerState_1(BitStream* userData, ReceivePayload* pPayload);
- ObserverScope<OVR::Net::Plugins::RPCSlot> LatencyTesterAvailableScope;
+ ObserverScope<Net::Plugins::RPCSlot> LatencyTesterAvailableScope;
void LatencyTesterAvailable_1(BitStream* userData, ReceivePayload* pPayload);
+
+ ObserverScope<Net::Plugins::RPCSlot> HMDCountUpdateScope;
+ void HMDCountUpdate_1(BitStream* userData, ReceivePayload* pPayload);
};