aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/QXmppServiceInfo.cpp30
-rw-r--r--src/QXmppServiceInfo.h2
2 files changed, 28 insertions, 4 deletions
diff --git a/src/QXmppServiceInfo.cpp b/src/QXmppServiceInfo.cpp
index 3125709b..cae8ff64 100644
--- a/src/QXmppServiceInfo.cpp
+++ b/src/QXmppServiceInfo.cpp
@@ -37,21 +37,43 @@
#include <resolv.h>
#endif
-QString QXmppServiceInfo::hostName() const
+/// Constructs an empty service info object.
+///
+
+QXmppServiceInfo::QXmppServiceInfo()
+ : host_port(0)
{
- return host_name;
}
-quint16 QXmppServiceInfo::port() const
+/// Returns host name for this service.
+///
+
+QString QXmppServiceInfo::hostName() const
{
- return host_port;
+ return host_name;
}
+/// Sets the host name for this service.
+///
+/// \param hostName
+
void QXmppServiceInfo::setHostName(const QString &hostName)
{
host_name = hostName;
}
+/// Returns the port for this service.
+///
+
+quint16 QXmppServiceInfo::port() const
+{
+ return host_port;
+}
+
+/// Sets the port for this service.
+///
+/// \param port
+
void QXmppServiceInfo::setPort(quint16 port)
{
host_port = port;
diff --git a/src/QXmppServiceInfo.h b/src/QXmppServiceInfo.h
index a007e427..6dd44476 100644
--- a/src/QXmppServiceInfo.h
+++ b/src/QXmppServiceInfo.h
@@ -33,6 +33,8 @@
class QXmppServiceInfo
{
public:
+ QXmppServiceInfo();
+
QString hostName() const;
void setHostName(const QString &hostName);