ovr_sdk
view LibOVR/Src/Net/OVR_NetworkPlugin.cpp @ 3:f12a8f74fe1f
added the Xcode project
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 21 Jan 2015 11:37:50 +0200 |
parents | |
children |
line source
1 /************************************************************************************
3 Filename : OVR_NetworkPlugin.cpp
4 Content : Base class for an extension to the network objects.
5 Created : June 10, 2014
6 Authors : Kevin Jenkins
8 Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
10 Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
11 you may not use the Oculus VR Rift SDK except in compliance with the License,
12 which is provided at the time of installation or download, or which
13 otherwise accompanies this software in either electronic or hard copy form.
15 You may obtain a copy of the License at
17 http://www.oculusvr.com/licenses/LICENSE-3.2
19 Unless required by applicable law or agreed to in writing, the Oculus VR SDK
20 distributed under the License is distributed on an "AS IS" BASIS,
21 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 See the License for the specific language governing permissions and
23 limitations under the License.
25 ************************************************************************************/
27 #include "OVR_NetworkPlugin.h"
29 namespace OVR { namespace Net { namespace Plugins {
32 //-----------------------------------------------------------------------------
33 // Plugin identifier to assign next
35 //static uint8_t pluginIdNext = 0;
38 //-----------------------------------------------------------------------------
39 // NetworkPlugin
41 NetworkPlugin::NetworkPlugin()
42 {
43 pSession = 0;
44 //PluginId = pluginIdNext++;
45 }
47 NetworkPlugin::~NetworkPlugin()
48 {
49 }
51 void NetworkPlugin::OnAddedToSession(Session* _pSession)
52 {
53 if (pSession != 0)
54 {
55 pSession->RemoveSessionListener(this);
56 }
58 pSession = _pSession;
59 }
61 void NetworkPlugin::OnRemovedFromSession(Session* _pSession)
62 {
63 OVR_UNUSED(_pSession);
64 OVR_ASSERT(_pSession == pSession);
66 pSession = 0;
67 }
70 }}} // OVR::Net::Plugins