Skip to content

Commit

Permalink
NetworkObject: add RemoteSessionServer type
Browse files Browse the repository at this point in the history
  • Loading branch information
tobydox committed May 29, 2020
1 parent 9f2db1e commit 167214f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions core/src/NetworkObject.h
Expand Up @@ -43,6 +43,7 @@ class VEYON_CORE_EXPORT NetworkObject
None,
Root,
Location,
RemoteSessionServer,
Host,
Label,
TypeCount
Expand Down
9 changes: 6 additions & 3 deletions core/src/NetworkObjectDirectory.cpp
Expand Up @@ -59,7 +59,8 @@ void NetworkObjectDirectory::setUpdateInterval( int interval )
const NetworkObjectList& NetworkObjectDirectory::objects( const NetworkObject& parent ) const
{
if( parent.type() == NetworkObject::Type::Root ||
parent.type() == NetworkObject::Type::Location )
parent.type() == NetworkObject::Type::Location ||
parent.type() == NetworkObject::Type::RemoteSessionServer )
{
const auto it = m_objects.constFind( parent.modelId() );
if( it != m_objects.end() )
Expand Down Expand Up @@ -283,7 +284,8 @@ void NetworkObjectDirectory::addOrUpdateObject( const NetworkObject& networkObje
Q_EMIT objectsAboutToBeInserted( parent, objectList.count(), 1 );

objectList.append( completeNetworkObject );
if( completeNetworkObject.type() == NetworkObject::Type::Location )
if( completeNetworkObject.type() == NetworkObject::Type::Location ||
completeNetworkObject.type() == NetworkObject::Type::RemoteSessionServer )
{
m_objects[completeNetworkObject.modelId()] = {};
}
Expand Down Expand Up @@ -314,7 +316,8 @@ void NetworkObjectDirectory::removeObjects( const NetworkObject& parent, const N
{
if( removeObjectFilter( *it ) )
{
if( it->type() == NetworkObject::Type::Location )
if( it->type() == NetworkObject::Type::Location ||
it->type() == NetworkObject::Type::RemoteSessionServer )
{
objectsToRemove.append( it->modelId() );
}
Expand Down
1 change: 1 addition & 0 deletions master/src/ComputerManager.cpp
Expand Up @@ -381,6 +381,7 @@ ComputerList ComputerManager::selectedComputers( const QModelIndex& parent )
switch( objectType )
{
case NetworkObject::Type::Location:
case NetworkObject::Type::RemoteSessionServer:
computers += selectedComputers( entryIndex );
break;
case NetworkObject::Type::Host:
Expand Down

0 comments on commit 167214f

Please sign in to comment.