swift
hostnode.cpp
1 // SPDX-FileCopyrightText: Copyright (C) 2014 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
4 #include "hostnode.h"
5 
6 #include "directplayutils.h"
7 
8 namespace swift::simplugin::fs9
9 {
11 
12  CHostNode::CHostNode(const CHostNode &other) : m_appDesc(other.m_appDesc), m_sessionName(other.m_sessionName)
13  {
14  other.m_hostAddress->Duplicate(&m_hostAddress);
15  }
16 
17  CHostNode::~CHostNode() { SafeRelease(m_hostAddress); }
18 
20  {
21  // check for self-assignment
22  if (&other == this) { return *this; }
23 
24  m_appDesc = other.m_appDesc;
25  m_sessionName = other.m_sessionName;
26  other.m_hostAddress->Duplicate(&m_hostAddress);
27  return *this;
28  }
29 } // namespace swift::simplugin::fs9
void SafeRelease(T *&pT)
Safely release a COM allocated object.
Class representing a enumerated host node.
Definition: hostnode.h:17
CHostNode & operator=(const CHostNode &other)
Copy assignment operator.
Definition: hostnode.cpp:19