[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/dnssd
From:       Jakub Stachowski <qbast () go2 ! pl>
Date:       2008-12-12 19:09:40
Message-ID: 1229108980.088371.24723.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 896176 by qbast:

Documentation update



 M  +1 -2      mdnsd-servicebrowser.cpp  
 M  +5 -0      servicebase.cpp  
 M  +1 -0      servicebase.h  
 M  +12 -7     servicebrowser.h  


--- trunk/KDE/kdelibs/dnssd/mdnsd-servicebrowser.cpp #896175:896176
@@ -183,10 +183,9 @@
 	return QHostAddress();
 }
 
-// TODO: Please Implement Me - using a system call (if not natively)
 QString ServiceBrowser::getLocalHostName()
 {
-	return QString();
+	return QHostInfo::localHostName();
 }
 
 }
--- trunk/KDE/kdelibs/dnssd/servicebase.cpp #896175:896176
@@ -75,6 +75,11 @@
     return d->m_domain==o.d->m_domain && d->m_serviceName==o.d->m_serviceName && \
d->m_type==o.d->m_type;  }
 
+bool ServiceBase::operator!=(const ServiceBase& o) const 
+{
+    return !(*this == o);
+}
+
 void ServiceBase::virtual_hook(int, void*)
 {}
 
--- trunk/KDE/kdelibs/dnssd/servicebase.h #896175:896176
@@ -94,6 +94,7 @@
 	Compares service name, type and domain. This is enough to for unique identification \
and omitting  port, host and text data allows to compare resolved and unresolved \
services */  bool operator==(const ServiceBase& o) const;
+	bool operator!=(const ServiceBase& o) const;
 
 protected:
 	ServiceBase(ServiceBasePrivate* const d);
--- trunk/KDE/kdelibs/dnssd/servicebrowser.h #896175:896176
@@ -129,17 +129,22 @@
 	bool isAutoResolving() const;
 
 	/**
-	 * @brief Resolved a hostname via the dnssd service into a dotted decimal IP \
                Address
-	 *
-	 * The can only be used to resolve an mdns hostname
-	 * @param hostname The hostname to be resolved
-	 * @return A QHostAddress containing the IP address. QHostAddress() returned if \
failed +	@brief Resolved a hostname using mDNS into IP address.
+	 
+	This function is very rarely useful - properly configured system is able to resolve \
mDNS-based host name +	using system resolver. 
+	@param hostname The hostname to be resolved
+	@return A QHostAddress containing the IP address. QHostAddress() returned if failed
+	\since 4.2
 	 */
 	static QHostAddress resolveHostName(const QString &hostname);
 
 	/**
-	 * @brief This function simply returns the name of this machine's hostname
-	 * @return A QString representing the hostname. Returns QString() if failed
+	@brief This function simply returns the name of this machine's hostname as \
announced by mDNS protocol.  +	Usually it will be the same as calling \
QHostInfo::localHostName(), however it may be changed to something different +	in \
avahi configuration file (if using Avahi backend). +	@return A QString representing \
the hostname. Returns QString() if failed +	\since 4.2
 	 */
 	static QString getLocalHostName();
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic