swift
hostnode.h
Go to the documentation of this file.
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 #ifndef SWIFT_SIMPLUGIN_FS9_HOST_NODE_H
5 #define SWIFT_SIMPLUGIN_FS9_HOST_NODE_H
6 
7 #include <dplay8.h>
8 
9 #include <QString>
10 
12 
13 namespace swift::simplugin::fs9
14 {
16  struct CHostNode
17  {
19  CHostNode();
20 
22  CHostNode(const CHostNode &other);
23 
25  ~CHostNode();
26 
28  DPN_APPLICATION_DESC getApplicationDesc() const { return m_appDesc; }
29 
31  void setApplicationDesc(const DPN_APPLICATION_DESC &appDesc) { m_appDesc = appDesc; }
32 
34  IDirectPlay8Address **getHostAddressPtr() { return &m_hostAddress; }
35 
37  IDirectPlay8Address *getHostAddress() { return m_hostAddress; }
38 
40  void setHostAddress(IDirectPlay8Address *address) { m_hostAddress = address; }
41 
43  QString getSessionName() const { return m_sessionName; }
44 
46  void setSessionName(const QString &name) { m_sessionName = name; }
47 
49  CHostNode &operator=(const CHostNode &other);
50 
51  private:
52  IDirectPlay8Address *m_hostAddress = nullptr;
53  DPN_APPLICATION_DESC m_appDesc;
54  QString m_sessionName;
55  };
56 } // namespace swift::simplugin::fs9
57 
58 #endif // SWIFT_SIMPLUGIN_FS9_HOST_NODE_H
Class representing a enumerated host node.
Definition: hostnode.h:17
CHostNode & operator=(const CHostNode &other)
Copy assignment operator.
Definition: hostnode.cpp:19
void setHostAddress(IDirectPlay8Address *address)
Sets hosts address.
Definition: hostnode.h:40
IDirectPlay8Address * getHostAddress()
Returns the hosts address.
Definition: hostnode.h:37
IDirectPlay8Address ** getHostAddressPtr()
Returns a pointer to the hosts address.
Definition: hostnode.h:34
void setApplicationDesc(const DPN_APPLICATION_DESC &appDesc)
Set the hosts application description.
Definition: hostnode.h:31
QString getSessionName() const
Returns the sessions name.
Definition: hostnode.h:43
DPN_APPLICATION_DESC getApplicationDesc() const
Returns the hosts application description.
Definition: hostnode.h:28
void setSessionName(const QString &name)
Set the session name.
Definition: hostnode.h:46