summaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/Net/OVR_RPC1.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-28 02:08:11 +0100
committerSven Gothel <[email protected]>2015-03-28 02:08:11 +0100
commit450aa6f7df9e67dd256b86f94e65eaf707032aad (patch)
tree04aa207d84ddc8ca246d2573aaaf756b3ce8a0b5 /LibOVR/Src/Net/OVR_RPC1.cpp
parent3c7b8a17e907f4ef2afd9f77db566a3f6179cbe4 (diff)
parent4207f9c279e832e3afcb3f5fc6cd8d84cb4cfe4c (diff)
Merge branch 'vanilla_0.5.0.1' into jogamp_0.5.0.1
Conflicts: LibOVR/Include/OVR_CAPI_0_5_0.h LibOVR/Src/CAPI/CAPI_HMDState.cpp LibOVR/Src/Displays/OVR_Win32_Dxgi_Display.h LibOVR/Src/Kernel/OVR_System.cpp LibOVR/Src/OVR_CAPI.cpp LibOVR/Src/OVR_Profile.cpp LibOVRKernel/Src/Kernel/OVR_ThreadsWinAPI.cpp LibOVRKernel/Src/Kernel/OVR_Types.h
Diffstat (limited to 'LibOVR/Src/Net/OVR_RPC1.cpp')
-rw-r--r--LibOVR/Src/Net/OVR_RPC1.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/LibOVR/Src/Net/OVR_RPC1.cpp b/LibOVR/Src/Net/OVR_RPC1.cpp
index 12afb09..b6137a5 100644
--- a/LibOVR/Src/Net/OVR_RPC1.cpp
+++ b/LibOVR/Src/Net/OVR_RPC1.cpp
@@ -26,7 +26,7 @@ limitations under the License.
#include "OVR_RPC1.h"
#include "OVR_BitStream.h"
-#include "../Kernel/OVR_Threads.h" // Thread::MSleep
+#include "Kernel/OVR_Threads.h" // Thread::MSleep
#include "OVR_MessageIDTypes.h"
namespace OVR { namespace Net { namespace Plugins {
@@ -54,13 +54,12 @@ RPC1::RPC1()
RPC1::~RPC1()
{
- slotHash.Clear();
delete blockingReturnValue;
}
-void RPC1::RegisterSlot(OVR::String sharedIdentifier, OVR::Observer<RPCSlot>* rpcSlotObserver )
+void RPC1::RegisterSlot(OVR::String sharedIdentifier, OVR::CallbackListener<RPCSlot>* rpcSlotObserver)
{
- slotHash.AddObserverToSubject(sharedIdentifier, rpcSlotObserver);
+ slotHash.AddListener(sharedIdentifier, rpcSlotObserver);
}
bool RPC1::RegisterBlockingFunction(OVR::String uniqueID, RPCDelegate blockingFunction)
@@ -235,18 +234,15 @@ void RPC1::OnReceive(ReceivePayload *pPayload, ListenerReceiveResult *lrrOut)
OVR::String sharedIdentifier;
bsIn.Read(sharedIdentifier);
- Observer<RPCSlot> *o = slotHash.GetSubject(sharedIdentifier);
+ CallbackEmitter<RPCSlot>* o = slotHash.GetKey(sharedIdentifier);
if (o)
{
bsIn.AlignReadToByteBoundary();
- if (o)
- {
- OVR::Net::BitStream serializedParameters(bsIn.GetData() + bsIn.GetReadOffset()/8, bsIn.GetNumberOfUnreadBits()/8, false);
+ OVR::Net::BitStream serializedParameters(bsIn.GetData() + bsIn.GetReadOffset()/8, bsIn.GetNumberOfUnreadBits()/8, false);
- o->Call(&serializedParameters, pPayload);
- }
+ o->Call(&serializedParameters, pPayload);
}
}
}