DNSSD
avahi_server_interface.cpp
Go to the documentation of this file.00001 /* 00002 * This file was generated by dbusxml2cpp version 0.6 00003 * Command line was: dbusxml2cpp -m -p avahi_server_interface /home/qba/src/kdelibs/dnssd/org.freedesktop.Avahi.Server.xml 00004 * 00005 * dbusxml2cpp is Copyright (C) 2006 Trolltech ASA. All rights reserved. 00006 * 00007 * This is an auto-generated file. 00008 * This file may have been hand-edited. Look for HAND-EDIT comments 00009 * before re-generating it. 00010 */ 00011 00012 #include "avahi_server_interface.h" 00013 #include "servicebase.h" 00014 #include <QtCore/QUrl> 00015 #ifndef KDE_USE_FINAL 00016 Q_DECLARE_METATYPE(QList<QByteArray>) 00017 #endif 00018 /* 00019 * Implementation of interface class OrgFreedesktopAvahiServerInterface 00020 */ 00021 00022 OrgFreedesktopAvahiServerInterface::OrgFreedesktopAvahiServerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) 00023 : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) 00024 { 00025 } 00026 00027 OrgFreedesktopAvahiServerInterface::~OrgFreedesktopAvahiServerInterface() 00028 { 00029 } 00030 00031 namespace DNSSD { 00032 00033 00034 void registerTypes() 00035 { 00036 static bool registered=false; 00037 if (!registered) { 00038 qDBusRegisterMetaType<QList<QByteArray> >(); 00039 registered=true; 00040 } 00041 } 00042 00043 QString domainToDNS(const QString &domain) 00044 { 00045 if (domainIsLocal(domain)) return domain; 00046 else return QUrl::toAce(domain); 00047 } 00048 00049 QString DNSToDomain(const QString& domain) 00050 { 00051 if (domainIsLocal(domain)) return domain; 00052 else return QUrl::fromAce(domain.toAscii()); 00053 } 00054 } 00055 00056 #include "avahi_server_interface.moc"