nuclear@0: /************************************************************************************ nuclear@0: nuclear@0: Filename : OVR_NetworkPlugin.cpp nuclear@0: Content : Base class for an extension to the network objects. nuclear@0: Created : June 10, 2014 nuclear@0: Authors : Kevin Jenkins nuclear@0: nuclear@0: Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. nuclear@0: nuclear@0: Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); nuclear@0: you may not use the Oculus VR Rift SDK except in compliance with the License, nuclear@0: which is provided at the time of installation or download, or which nuclear@0: otherwise accompanies this software in either electronic or hard copy form. nuclear@0: nuclear@0: You may obtain a copy of the License at nuclear@0: nuclear@0: http://www.oculusvr.com/licenses/LICENSE-3.2 nuclear@0: nuclear@0: Unless required by applicable law or agreed to in writing, the Oculus VR SDK nuclear@0: distributed under the License is distributed on an "AS IS" BASIS, nuclear@0: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. nuclear@0: See the License for the specific language governing permissions and nuclear@0: limitations under the License. nuclear@0: nuclear@0: ************************************************************************************/ nuclear@0: nuclear@0: #include "OVR_NetworkPlugin.h" nuclear@0: nuclear@0: namespace OVR { namespace Net { namespace Plugins { nuclear@0: nuclear@0: nuclear@0: //----------------------------------------------------------------------------- nuclear@0: // Plugin identifier to assign next nuclear@0: nuclear@0: //static uint8_t pluginIdNext = 0; nuclear@0: nuclear@0: nuclear@0: //----------------------------------------------------------------------------- nuclear@0: // NetworkPlugin nuclear@0: nuclear@0: NetworkPlugin::NetworkPlugin() nuclear@0: { nuclear@0: pSession = 0; nuclear@0: //PluginId = pluginIdNext++; nuclear@0: } nuclear@0: nuclear@0: NetworkPlugin::~NetworkPlugin() nuclear@0: { nuclear@0: } nuclear@0: nuclear@0: void NetworkPlugin::OnAddedToSession(Session* _pSession) nuclear@0: { nuclear@0: if (pSession != 0) nuclear@0: { nuclear@0: pSession->RemoveSessionListener(this); nuclear@0: } nuclear@0: nuclear@0: pSession = _pSession; nuclear@0: } nuclear@0: nuclear@0: void NetworkPlugin::OnRemovedFromSession(Session* _pSession) nuclear@0: { nuclear@0: OVR_UNUSED(_pSession); nuclear@0: OVR_ASSERT(_pSession == pSession); nuclear@0: nuclear@0: pSession = 0; nuclear@0: } nuclear@0: nuclear@0: nuclear@0: }}} // OVR::Net::Plugins